From 321c088fb2bd003ca97c34aa0febe7476ea491cd Mon Sep 17 00:00:00 2001 From: Gaurav Gupta Date: Thu, 8 Apr 2021 13:55:24 +0530 Subject: [PATCH] FISH-1280 Jakarta EE9: jakarta.xml.rpc-api removed Signed-off-by: Gaurav Gupta --- api/payara-bom/pom.xml | 5 - .../src/main/resources/config/default-web.xml | 1 - .../src/main/resources/config/default-web.xml | 1 - .../src/main/resources/config/default-web.xml | 1 - .../src/main/resources/config/default-web.xml | 1 - .../ServiceReferenceDescriptor.java | 2 +- appserver/extras/javaee/manifest-jar/pom.xml | 2 +- .../packager/glassfish-common-full/pom.xml | 10 - appserver/pom.xml | 12 - .../webservices/SecurityServiceImpl.java | 7 - appserver/webservices/jsr109-impl/pom.xml | 4 - .../webservices/SecurityService.java | 2 - .../WebServiceReferenceManagerImpl.java | 358 ++++++++---------- .../org/glassfish/webservices/WsUtil.java | 179 --------- .../monitoring/WebServiceTesterServlet.java | 1 - .../main/resources/glassfish/bin/schemagen | 4 +- .../resources/glassfish/bin/schemagen.bat | 4 +- .../main/resources/glassfish/bin/wscompile | 4 +- .../resources/glassfish/bin/wscompile.bat | 4 +- .../src/main/resources/glassfish/bin/wsdeploy | 4 +- .../main/resources/glassfish/bin/wsdeploy.bat | 4 +- .../src/main/resources/glassfish/bin/wsgen | 4 +- .../main/resources/glassfish/bin/wsgen.bat | 4 +- .../src/main/resources/glassfish/bin/wsimport | 4 +- .../main/resources/glassfish/bin/wsimport.bat | 4 +- .../src/main/resources/glassfish/bin/xjc | 4 +- .../src/main/resources/glassfish/bin/xjc.bat | 4 +- pom.xml | 1 - 28 files changed, 180 insertions(+), 455 deletions(-) diff --git a/api/payara-bom/pom.xml b/api/payara-bom/pom.xml index 3d60279e7a8..15b0d107d10 100644 --- a/api/payara-bom/pom.xml +++ b/api/payara-bom/pom.xml @@ -318,11 +318,6 @@ jakarta.transaction-api ${jakarta.transaction-api.version} - - jakarta.xml.rpc - jakarta.xml.rpc-api - ${jakarta.xml.rpc-api.version} - jakarta.enterprise jakarta.enterprise.cdi-api diff --git a/appserver/admin/gf_template/src/main/resources/config/default-web.xml b/appserver/admin/gf_template/src/main/resources/config/default-web.xml index 5db4a221be2..cc49682194a 100644 --- a/appserver/admin/gf_template/src/main/resources/config/default-web.xml +++ b/appserver/admin/gf_template/src/main/resources/config/default-web.xml @@ -336,7 +336,6 @@ jakarta.security.auth.message-api.jar jakarta.security.jacc-api.jar jakarta.transaction-api.jar - jakarta.xml.rpc-api.jar webservices-osgi.jar weld-osgi-bundle.jar jersey-mvc-jsp.jar diff --git a/appserver/admin/gf_template_web/src/main/resources/config/default-web.xml b/appserver/admin/gf_template_web/src/main/resources/config/default-web.xml index 889ca89bb3e..a7040978a0c 100644 --- a/appserver/admin/gf_template_web/src/main/resources/config/default-web.xml +++ b/appserver/admin/gf_template_web/src/main/resources/config/default-web.xml @@ -333,7 +333,6 @@ jakarta.security.auth.message-api.jar jakarta.security.jacc-api.jar jakarta.transaction-api.jar - jakarta.xml.rpc-api.jar webservices-osgi.jar weld-osgi-bundle.jar jersey-mvc-jsp.jar diff --git a/appserver/admin/production_domain_template/src/main/resources/config/default-web.xml b/appserver/admin/production_domain_template/src/main/resources/config/default-web.xml index d163fd46086..4469f4ff331 100644 --- a/appserver/admin/production_domain_template/src/main/resources/config/default-web.xml +++ b/appserver/admin/production_domain_template/src/main/resources/config/default-web.xml @@ -318,7 +318,6 @@ jakarta.security.auth.message-api.jar jakarta.security.jacc-api.jar jakarta.transaction-api.jar - jakarta.xml.rpc-api.jar webservices-osgi.jar weld-osgi-bundle.jar jersey-mvc-jsp.jar diff --git a/appserver/admin/production_domain_template_web/src/main/resources/config/default-web.xml b/appserver/admin/production_domain_template_web/src/main/resources/config/default-web.xml index 76780d8b8f9..a1741a97002 100644 --- a/appserver/admin/production_domain_template_web/src/main/resources/config/default-web.xml +++ b/appserver/admin/production_domain_template_web/src/main/resources/config/default-web.xml @@ -342,7 +342,6 @@ jakarta.security.auth.message-api.jar jakarta.security.jacc-api.jar jakarta.transaction-api.jar - jakarta.xml.rpc-api.jar webservices-osgi.jar weld-osgi-bundle.jar jersey-mvc-jsp.jar diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ServiceReferenceDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ServiceReferenceDescriptor.java index 60eed81de81..dd719f66c51 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ServiceReferenceDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ServiceReferenceDescriptor.java @@ -273,7 +273,7 @@ public BundleDescriptor getBundleDescriptor() { } public boolean hasGenericServiceInterface() { - return "javax.xml.rpc.Service".equals(serviceInterface); + return false; } public boolean hasGeneratedServiceInterface() { diff --git a/appserver/extras/javaee/manifest-jar/pom.xml b/appserver/extras/javaee/manifest-jar/pom.xml index 06a820845b1..a5741529980 100644 --- a/appserver/extras/javaee/manifest-jar/pom.xml +++ b/appserver/extras/javaee/manifest-jar/pom.xml @@ -59,7 +59,7 @@ - ../modules/jakarta.servlet-api.jar ../modules/jakarta.annotation-api.jar ../modules/jakarta.ejb-api.jar ../modules/jakarta.transaction-api.jar ../modules/javax.enterprise.deploy-api.jar ../modules/jakarta.resource-api.jar ../modules/jakarta.security.auth.message-api.jar ../modules/jakarta.security.jacc-api.jar ../modules/webservices-osgi.jar ../modules/jaxb-osgi.jar ../modules/jakarta.xml.bind-api.jar ../modules/webservices-api-osgi.jar ../modules/javax.xml.rpc-api.jar ../modules/javax.xml.registry-api.jar ../modules/jakarta.mail.jar ../modules/jakarta.faces.jar ../modules/jakarta.servlet.jsp-api.jar ../modules/jakarta.el.jar ../modules/jakarta.servlet.jsp.jstl-api.jar ../modules/jakarta.persistence.jar ../modules/jakarta.jms-api.jar ../modules/hibernate-validator.jar ../modules/cdi-api.jar ../../mq/lib/jaxm-api.jar ../modules/jakarta.ws.rs-api.jar ../modules/jakarta.json.jar ../modules/javax.websocket-api.jar ../modules/javax.enterprise.concurrent-api.jar ../modules/jakarta.batch-api.jar + ../modules/jakarta.servlet-api.jar ../modules/jakarta.annotation-api.jar ../modules/jakarta.ejb-api.jar ../modules/jakarta.transaction-api.jar ../modules/javax.enterprise.deploy-api.jar ../modules/jakarta.resource-api.jar ../modules/jakarta.security.auth.message-api.jar ../modules/jakarta.security.jacc-api.jar ../modules/webservices-osgi.jar ../modules/jaxb-osgi.jar ../modules/jakarta.xml.bind-api.jar ../modules/webservices-api-osgi.jar ../modules/javax.xml.registry-api.jar ../modules/jakarta.mail.jar ../modules/jakarta.faces.jar ../modules/jakarta.servlet.jsp-api.jar ../modules/jakarta.el.jar ../modules/jakarta.servlet.jsp.jstl-api.jar ../modules/jakarta.persistence.jar ../modules/jakarta.jms-api.jar ../modules/hibernate-validator.jar ../modules/cdi-api.jar ../../mq/lib/jaxm-api.jar ../modules/jakarta.ws.rs-api.jar ../modules/jakarta.json.jar ../modules/javax.websocket-api.jar ../modules/javax.enterprise.concurrent-api.jar ../modules/jakarta.batch-api.jar true diff --git a/appserver/packager/glassfish-common-full/pom.xml b/appserver/packager/glassfish-common-full/pom.xml index 4f1e6a2c22f..11c34c94189 100644 --- a/appserver/packager/glassfish-common-full/pom.xml +++ b/appserver/packager/glassfish-common-full/pom.xml @@ -177,16 +177,6 @@ payara-jbatch ${project.version} - - - - - - jakarta.xml.rpc - jakarta.xml.rpc-api - diff --git a/appserver/pom.xml b/appserver/pom.xml index 1f546c97663..ab5d6ff27a2 100644 --- a/appserver/pom.xml +++ b/appserver/pom.xml @@ -439,18 +439,6 @@ ${jakarta.xml.registry-api.version} javax.xml.registry - - - jakarta.xml.rpc - jakarta.xml.rpc-api - ${jakarta.xml.rpc-api.version} - - false - api - 1.1 - ${jakarta.xml.rpc-api.version} - javax.xml.rpc - jakarta.enterprise.deploy diff --git a/appserver/security/webservices.security/src/main/java/com/sun/enterprise/security/webservices/SecurityServiceImpl.java b/appserver/security/webservices.security/src/main/java/com/sun/enterprise/security/webservices/SecurityServiceImpl.java index 24cf3684f4e..42d3b5e3d29 100644 --- a/appserver/security/webservices.security/src/main/java/com/sun/enterprise/security/webservices/SecurityServiceImpl.java +++ b/appserver/security/webservices.security/src/main/java/com/sun/enterprise/security/webservices/SecurityServiceImpl.java @@ -40,11 +40,9 @@ // Portions Copyright [2018-2019] [Payara Foundation and/or its affiliates] package com.sun.enterprise.security.webservices; -import static com.sun.enterprise.security.jauth.AuthConfig.SOAP; import static com.sun.enterprise.security.webservices.LogUtils.BASIC_AUTH_ERROR; import static com.sun.enterprise.security.webservices.LogUtils.CLIENT_CERT_ERROR; import static com.sun.enterprise.security.webservices.LogUtils.EJB_SEC_CONFIG_FAILURE; -import static com.sun.enterprise.security.webservices.LogUtils.EXCEPTION_THROWN; import static java.util.logging.Level.FINE; import static java.util.logging.Level.SEVERE; import static java.util.logging.Level.WARNING; @@ -55,17 +53,13 @@ import java.security.Principal; import java.security.cert.X509Certificate; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.logging.Logger; import jakarta.inject.Inject; import jakarta.inject.Singleton; import jakarta.security.jacc.PolicyContext; import jakarta.servlet.http.HttpServletRequest; -import javax.xml.namespace.QName; -import javax.xml.rpc.handler.HandlerInfo; import jakarta.xml.soap.SOAPMessage; import org.apache.catalina.util.Base64; @@ -84,7 +78,6 @@ import com.sun.enterprise.security.ee.audit.AppServerAuditManager; import com.sun.enterprise.security.jacc.context.PolicyContextHandlerImpl; import com.sun.enterprise.security.jauth.AuthConfig; -import com.sun.enterprise.security.jauth.jaspic.provider.ClientAuthConfig; import com.sun.enterprise.security.jauth.jaspic.provider.ServerAuthConfig; import com.sun.enterprise.security.web.integration.WebPrincipal; import com.sun.enterprise.web.WebModule; diff --git a/appserver/webservices/jsr109-impl/pom.xml b/appserver/webservices/jsr109-impl/pom.xml index 62169b8d8c2..637d1170d08 100755 --- a/appserver/webservices/jsr109-impl/pom.xml +++ b/appserver/webservices/jsr109-impl/pom.xml @@ -104,10 +104,6 @@ web-glue ${project.version} - - jakarta.xml.rpc - jakarta.xml.rpc-api - org.glassfish.metro webservices-osgi diff --git a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/SecurityService.java b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/SecurityService.java index e479cd9ec6a..5c54647b4d9 100644 --- a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/SecurityService.java +++ b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/SecurityService.java @@ -43,8 +43,6 @@ import java.security.Principal; import jakarta.servlet.http.HttpServletRequest; -import javax.xml.namespace.QName; -import javax.xml.rpc.handler.HandlerInfo; import org.jvnet.hk2.annotations.Contract; diff --git a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceReferenceManagerImpl.java b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceReferenceManagerImpl.java index 364e9e823c4..608dea4f90d 100644 --- a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceReferenceManagerImpl.java +++ b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceReferenceManagerImpl.java @@ -37,7 +37,6 @@ * only if the new code is made subject to such option by the copyright * holder. */ - package org.glassfish.webservices; import com.sun.enterprise.deployment.*; @@ -56,7 +55,6 @@ import javax.naming.NamingException; import javax.naming.InitialContext; import javax.xml.namespace.QName; -import javax.xml.rpc.ServiceFactory; import jakarta.xml.ws.soap.MTOMFeature; import jakarta.xml.ws.soap.AddressingFeature; import jakarta.xml.ws.WebServiceFeature; @@ -74,17 +72,15 @@ import java.security.PrivilegedActionException; import java.net.URL; - /** * This class acts as a service to resolve the - * jakarta.xml.ws.WebServiceRef references - * and also jakarta.xml.ws.WebServiceContext - * Whenever a lookup is done from GlassfishNamingManagerImpl - * these methods are invoked to resolve the references + * jakarta.xml.ws.WebServiceRef references and also + * jakarta.xml.ws.WebServiceContext Whenever a lookup is done from + * GlassfishNamingManagerImpl these methods are invoked to resolve the + * references * * @author Bhakti Mehta */ - @Service public class WebServiceReferenceManagerImpl implements WebServiceReferenceManager { @@ -100,7 +96,6 @@ public Object getWSContextObject() { public Object resolveWSReference(ServiceReferenceDescriptor desc, Context context) throws NamingException { - //Taken from NamingManagerImpl.getClientServiceObject Class serviceInterfaceClass = null; Object returnObj = null; @@ -108,7 +103,7 @@ public Object resolveWSReference(ServiceReferenceDescriptor desc, Context contex //Implementation for new lookup element in WebserviceRef InitialContext iContext = new InitialContext(); - if( desc.hasLookupName()) { + if (desc.hasLookupName()) { return iContext.lookup(desc.getLookupName()); } @@ -123,148 +118,110 @@ public Object resolveWSReference(ServiceReferenceDescriptor desc, Context contex resolvePortComponentLinks(desc); - javax.xml.rpc.Service serviceDelegate = null; jakarta.xml.ws.Service jaxwsDelegate = null; Object injValue = null; - if( desc.hasGeneratedServiceInterface() || desc.hasWsdlFile() ) { - - String serviceImplName = desc.getServiceImplClassName(); - if(serviceImplName != null) { - Class serviceImplClass = cl.loadClass(serviceImplName); - serviceDelegate = (javax.xml.rpc.Service) serviceImplClass.newInstance(); - } else { - - // The target is probably a post JAXRPC-1.1- based service; - // If Service Interface class is set, check if it is indeed a subclass of Service - // initiateInstance should not be called if the user has given jakarta.xml.ws.Service itself - // as the interface through DD - if(jakarta.xml.ws.Service.class.isAssignableFrom(serviceInterfaceClass) && - !jakarta.xml.ws.Service.class.equals(serviceInterfaceClass) ) { - // OK - the interface class is indeed the generated service class; get an instance - injValue = initiateInstance(serviceInterfaceClass, desc); - } else { - // First try failed; Try to get the Service class type from injected field name - // and from there try to get an instance of the service class - - // I assume the at all inejction target are expecting the SAME service - // interface, therefore I take the first one. - if (desc.isInjectable()) { - - InjectionTarget target = desc.getInjectionTargets().iterator().next(); - Class serviceType = null; - if (target.isFieldInjectable()) { - java.lang.reflect.Field f = target.getField(); - if(f == null) { - String fName = target.getFieldName(); - Class targetClass = cl.loadClass(target.getClassName()); - try { - f = targetClass.getDeclaredField(fName); - } catch(java.lang.NoSuchFieldException nsfe) {}// ignoring exception - } - if(f != null) { - serviceType = f.getType(); - } - } - if (target.isMethodInjectable()) { - Method m = target.getMethod(); - if(m == null) { - String mName = target.getMethodName(); - Class targetClass = cl.loadClass(target.getClassName()); - try { - m = targetClass.getDeclaredMethod(mName); - } catch(java.lang.NoSuchMethodException nsfe) {}// ignoring exception - } - if (m != null && m.getParameterTypes().length==1) { - serviceType = m.getParameterTypes()[0]; - } - } - if (serviceType!=null){ - Class loadedSvcClass = cl.loadClass(serviceType.getCanonicalName()); - injValue = initiateInstance(loadedSvcClass, desc); - } + // The target is probably a post JAXRPC-1.1- based service; + // If Service Interface class is set, check if it is indeed a subclass of Service + // initiateInstance should not be called if the user has given jakarta.xml.ws.Service itself + // as the interface through DD + if (jakarta.xml.ws.Service.class.isAssignableFrom(serviceInterfaceClass) + && !jakarta.xml.ws.Service.class.equals(serviceInterfaceClass)) { + // OK - the interface class is indeed the generated service class; get an instance + injValue = initiateInstance(serviceInterfaceClass, desc); + } else { + // First try failed; Try to get the Service class type from injected field name + // and from there try to get an instance of the service class + + // I assume the at all inejction target are expecting the SAME service + // interface, therefore I take the first one. + if (desc.isInjectable()) { + + InjectionTarget target = desc.getInjectionTargets().iterator().next(); + Class serviceType = null; + if (target.isFieldInjectable()) { + java.lang.reflect.Field f = target.getField(); + if (f == null) { + String fName = target.getFieldName(); + Class targetClass = cl.loadClass(target.getClassName()); + try { + f = targetClass.getDeclaredField(fName); + } catch (java.lang.NoSuchFieldException nsfe) { + }// ignoring exception + } + if (f != null) { + serviceType = f.getType(); + } + } + if (target.isMethodInjectable()) { + Method m = target.getMethod(); + if (m == null) { + String mName = target.getMethodName(); + Class targetClass = cl.loadClass(target.getClassName()); + try { + m = targetClass.getDeclaredMethod(mName); + } catch (java.lang.NoSuchMethodException nsfe) { + }// ignoring exception + } + if (m != null && m.getParameterTypes().length == 1) { + serviceType = m.getParameterTypes()[0]; } } - // Unable to get hold of generated service class -> try the Service.create avenue to get a Service - if(injValue == null) { - // Here create the service with WSDL (overridden wsdl if wsdl-override is present) - // so that JAXWS runtime uses this wsdl @ runtime - jakarta.xml.ws.Service svc = - jakarta.xml.ws.Service.create((new WsUtil()).privilegedGetServiceRefWsdl(desc), - desc.getServiceName()); - jaxwsDelegate = new JAXWSServiceDelegate(desc, svc, cl); + if (serviceType != null) { + Class loadedSvcClass = cl.loadClass(serviceType.getCanonicalName()); + injValue = initiateInstance(loadedSvcClass, desc); } } + } + // Unable to get hold of generated service class -> try the Service.create avenue to get a Service + if (injValue == null) { + // Here create the service with WSDL (overridden wsdl if wsdl-override is present) + // so that JAXWS runtime uses this wsdl @ runtime + jakarta.xml.ws.Service svc + = jakarta.xml.ws.Service.create((new WsUtil()).privilegedGetServiceRefWsdl(desc), + desc.getServiceName()); + jaxwsDelegate = new JAXWSServiceDelegate(desc, svc, cl); + } - if( desc.hasHandlers() ) { - // We need the service's ports to configure the - // handler chain (since service-ref handler chain can - // optionally specify handler-port association) - // so create a configured service and call getPorts - - javax.xml.rpc.Service configuredService = - wsUtil.createConfiguredService(desc); - Iterator ports = configuredService.getPorts(); - wsUtil.configureHandlerChain - (desc, serviceDelegate, ports, cl); - } - - // check if this is a post 1.1 web service - if(jakarta.xml.ws.Service.class.isAssignableFrom(serviceInterfaceClass)) { - // This is a JAXWS based webservice client; - // process handlers and mtom setting - // moved test for handlers into wsUtil, in case - // we have to add system handler + // check if this is a post 1.1 web service + if (jakarta.xml.ws.Service.class.isAssignableFrom(serviceInterfaceClass)) { + // This is a JAXWS based webservice client; + // process handlers and mtom setting + // moved test for handlers into wsUtil, in case + // we have to add system handler - jakarta.xml.ws.Service service = - (injValue != null ? - (jakarta.xml.ws.Service) injValue : jaxwsDelegate); + jakarta.xml.ws.Service service + = (injValue != null + ? (jakarta.xml.ws.Service) injValue : jaxwsDelegate); - if (service != null) { - // Now configure client side handlers - wsUtil.configureJAXWSClientHandlers(service, desc); - } - // the requested resource is not the service but one of its port. - if (injValue!=null && desc.getInjectionTargetType()!=null) { - Class requestedPortType = service.getClass().getClassLoader().loadClass(desc.getInjectionTargetType()); - ArrayList wsFeatures = getWebServiceFeatures(desc); - if (wsFeatures.size() >0) { - injValue = service.getPort(requestedPortType,wsFeatures.toArray(new WebServiceFeature[wsFeatures.size()])); - } else { - injValue = service.getPort(requestedPortType); - } + if (service != null) { + // Now configure client side handlers + wsUtil.configureJAXWSClientHandlers(service, desc); + } + // the requested resource is not the service but one of its port. + if (injValue != null && desc.getInjectionTargetType() != null) { + Class requestedPortType = service.getClass().getClassLoader().loadClass(desc.getInjectionTargetType()); + ArrayList wsFeatures = getWebServiceFeatures(desc); + if (wsFeatures.size() > 0) { + injValue = service.getPort(requestedPortType, wsFeatures.toArray(new WebServiceFeature[wsFeatures.size()])); + } else { + injValue = service.getPort(requestedPortType); } - } - } else { - // Generic service interface / no WSDL - QName serviceName = desc.getServiceName(); - if( serviceName == null ) { - // ServiceFactory API requires a service-name. - // However, 109 does not allow getServiceName() to be - // called, so it's ok to use a dummy value. - serviceName = new QName("urn:noservice", "servicename"); - } - ServiceFactory serviceFac = ServiceFactory.newInstance(); - serviceDelegate = serviceFac.createService(serviceName); } - // Create a proxy for the service object. - // Get a proxy only in jaxrpc case because in jaxws the service class is not - // an interface any more - InvocationHandler handler = null; - if(jaxwsDelegate != null) { + if (jaxwsDelegate != null) { returnObj = jaxwsDelegate; - } else if(injValue != null) { + } else if (injValue != null) { returnObj = injValue; } - } catch(PrivilegedActionException pae) { + } catch (PrivilegedActionException pae) { logger.log(Level.WARNING, LogUtils.EXCEPTION_THROWN, pae); NamingException ne = new NamingException(); ne.initCause(pae.getCause()); throw ne; - } catch(Exception e) { + } catch (Exception e) { logger.log(Level.WARNING, LogUtils.EXCEPTION_THROWN, e); NamingException ne = new NamingException(); ne.initCause(e); @@ -307,15 +264,13 @@ private Object initiateInstance(Class svcClass, ServiceReferenceDescriptor desc) wsdlFile = wsu.resolveCatalog(catalogFile, desc.getWsdlFileUri(), null); } */ + Object obj = null; - Object obj = null ; - - java.lang.reflect.Constructor cons = svcClass.getConstructor - (new Class[]{java.net.URL.class, - javax.xml.namespace.QName.class}); + java.lang.reflect.Constructor cons = svcClass.getConstructor(new Class[]{java.net.URL.class, + javax.xml.namespace.QName.class}); try { - obj = - cons.newInstance(wsdlFile, desc.getServiceName()); + obj + = cons.newInstance(wsdlFile, desc.getServiceName()); } catch (Exception e) { /* * If WSDL URL is not accessible over http, trying to get an instance via @@ -325,29 +280,26 @@ private Object initiateInstance(Class svcClass, ServiceReferenceDescriptor desc) */ if (e instanceof InvocationTargetException) { URL optionalWsdlURL = generateWsdlFile(desc); - if (optionalWsdlURL == null) + if (optionalWsdlURL == null) { throw e; + } obj = cons.newInstance(optionalWsdlURL, desc.getServiceName()); } } - - /*TODO BM if jbi needs this reenable it descUtil.postServiceCreate(); - */ + */ return obj; } - - /** - * This method returns the location where optional wsdl file will be generated. - * The directory will be a directory having same name as WebService name inside - * application's generated xml directory. The name of the wsdl file will be - * wsdl.xml e.g. if application name is test and service name is Translator, - * then the location of wsdl will be + * This method returns the location where optional wsdl file will be + * generated. The directory will be a directory having same name as + * WebService name inside application's generated xml directory. The name of + * the wsdl file will be wsdl.xml e.g. if application name is test and + * service name is Translator, then the location of wsdl will be * $Glassfish_home/domains/domain1/generated/xml/test/Translator/wsdl.xml * * @param desc ServiceReferenceDescriptor @@ -367,7 +319,7 @@ private void createParentDirs(File optionalWsdlLocation) throws IOException { private URL generateWsdlFile(ServiceReferenceDescriptor desc) throws IOException { - /* + /* * Following piece of code is basically a copy-paste from JAXWSServlet's * doGet method (line 230) and from com.sun.xml.ws.transport.http.servlet.HttpAdapter's * publishWSDL method (line 587).This piece of code is not completely clear to me, @@ -378,8 +330,7 @@ private URL generateWsdlFile(ServiceReferenceDescriptor desc) throws IOException * invoked, basically it returns the reference to wsdl document marked as primary * wsdl inside ServiceDefinition. Probably we can directly fetch this wsdl * but for now I will go with the way it has been implemented in HttpAdapter. - */ - + */ File optionalWsdl = getOptionalWsdlLocation(desc); /* @@ -391,14 +342,15 @@ private URL generateWsdlFile(ServiceReferenceDescriptor desc) throws IOException * already been generated at this point in time and there is no need to * generate it again. */ - - if (optionalWsdl.exists()) + if (optionalWsdl.exists()) { return optionalWsdl.toURI().toURL(); + } createParentDirs(optionalWsdl); ServletAdapter targetEndpoint = getServletAdapter(desc); - if (targetEndpoint == null) + if (targetEndpoint == null) { return null; + } ServiceDefinition serviceDefinition = targetEndpoint.getServiceDefinition(); Iterator wsdlnum = serviceDefinition.iterator(); SDDocument wsdlDocument = null; @@ -410,8 +362,9 @@ private URL generateWsdlFile(ServiceReferenceDescriptor desc) throws IOException } } - if (wsdlDocument == null) + if (wsdlDocument == null) { return null; + } OutputStream outputStream = null; try { @@ -421,16 +374,17 @@ private URL generateWsdlFile(ServiceReferenceDescriptor desc) throws IOException DocumentAddressResolver resolver = targetEndpoint.getDocumentAddressResolver(portAddressResolver); wsdlDocument.writeTo(portAddressResolver, resolver, outputStream); } finally { - if (outputStream != null) + if (outputStream != null) { outputStream.close(); + } } return optionalWsdl.toURI().toURL(); } /** - * Returns ServletAdapter instance holding wsdl for the WebService being referred - * in WebServiceRef annotation. + * Returns ServletAdapter instance holding wsdl for the WebService being + * referred in WebServiceRef annotation. * * @param desc ServiceReferenceDescriptor * @return ServletAdapter instance having wsdl contents. @@ -446,7 +400,6 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { * and hence the BundleDescriptor being referred in ServiceReferenceDescriptor * is an instance of WebBundleDescriptor. */ - if (desc.getBundleDescriptor() instanceof WebBundleDescriptor) { webBundle = ((WebBundleDescriptor) desc.getBundleDescriptor()); @@ -457,7 +410,6 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { * If above assumption is not true, then make one last attempt to fetch * all required params from the wsdl url stored in ServiceReferenceDescriptor. */ - return getServletAdapterBasedOnWsdlUrl(desc); } @@ -467,7 +419,6 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { * reference to WebService in question. WebServicesDescriptor is never null as it * is being initialized at class level in BundleDescriptor. */ - WebServicesDescriptor wsDesc = webBundle.getWebServices(); assert wsDesc != null; @@ -480,7 +431,6 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { * processAWsRef call (line 339). WebServiceClient annotation have name param pointing * to webservice in question. */ - assert desc.getServiceLocalPart() != null; WebService webService = wsDesc.getWebServiceByName(desc.getServiceLocalPart()); @@ -489,8 +439,9 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { * If an unlikely event when there is no associated webService or desc.getServiceLocalPart() * itself is null, then fall back on fetching ServletAdapter based on wsdl url. */ - if (webService == null) + if (webService == null) { return getServletAdapterBasedOnWsdlUrl(desc); + } String contextRoot = webBundle.getContextRoot(); String webSevicePath = null; @@ -506,8 +457,9 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { if (desc.getServiceName().equals(endpoint.getServiceName()) && desc.getServiceNamespaceUri().equals(endpoint.getWsdlService().getNamespaceURI())) { String endPointAddressURI = endpoint.getEndpointAddressUri(); - if (endPointAddressURI == null || endPointAddressURI.length() == 0) + if (endPointAddressURI == null || endPointAddressURI.length() == 0) { return null; + } webSevicePath = endPointAddressURI.startsWith("/") ? endPointAddressURI : ("/" + endPointAddressURI); publishingContext = "/" + endpoint.getPublishingUri() + "/" + webService.getWsdlFileUri(); Adapter adapter = JAXWSAdapterRegistry.getInstance() @@ -519,11 +471,10 @@ private ServletAdapter getServletAdapter(ServiceReferenceDescriptor desc) { return null; } - /** * This method basically is a fall back mechanism to fetch required - * parameters from wsdl url stored in ServiceReferenceDescriptor. The flow reaches - * here only in case where required parameters could not be fetched + * parameters from wsdl url stored in ServiceReferenceDescriptor. The flow + * reaches here only in case where required parameters could not be fetched * from WebBundleDescriptor. * * @param desc ServiceReferenceDescriptor @@ -538,28 +489,32 @@ private ServletAdapter getServletAdapterBasedOnWsdlUrl(ServiceReferenceDescripto URL wsdl = desc.getWsdlFileUrl(); String wsdlPath = wsdl.getPath().trim(); - if (!wsdlPath.contains(WebServiceEndpoint.PUBLISHING_SUBCONTEXT)) + if (!wsdlPath.contains(WebServiceEndpoint.PUBLISHING_SUBCONTEXT)) { return null; + } - /* + /* * WsdlPath indeed contains the WebServiceEndpoint.PUBLISHING_SUBCONTEXT, * e.g.assuming that context root is test and Service name is Translator * then wsdl url must be in the following format : * /test/Translator/__container$publishing$subctx/null?wsdl - */ - + */ String contextRootAndPath = wsdlPath.substring(1, wsdlPath.indexOf(WebServiceEndpoint.PUBLISHING_SUBCONTEXT) - 1); // test/Translator - if (!(contextRootAndPath.length() > 0)) + if (!(contextRootAndPath.length() > 0)) { return null; + } String[] contextRootAndPathArray = contextRootAndPath.split("/"); // {test, Translator} - if (contextRootAndPathArray.length != 2) + if (contextRootAndPathArray.length != 2) { return null; - if (contextRootAndPathArray[0] == null) + } + if (contextRootAndPathArray[0] == null) { return null; + } String contextRoot = "/" + contextRootAndPathArray[0]; // /test - if (contextRootAndPathArray[1] == null) + if (contextRootAndPathArray[1] == null) { return null; + } String webSevicePath = "/" + contextRootAndPathArray[1]; // /Translator String urlPattern = wsdlPath.substring(contextRoot.length()); Adapter adapter = JAXWSAdapterRegistry.getInstance() @@ -578,44 +533,41 @@ private void mkDirs(File f) { } } - - - private ArrayList getWebServiceFeatures(ServiceReferenceDescriptor desc) { - /** - * JAXWS 2.2 enables @MTOM, @Addressing @RespectBinding - * on WebServiceRef - * If these are present use the - * Service(url,wsdl,features) constructor + /** + * JAXWS 2.2 enables @MTOM, @Addressing @RespectBinding on WebServiceRef + * If these are present use the Service(url,wsdl,features) constructor */ ArrayList wsFeatures = new ArrayList(); if (desc.isMtomEnabled()) { - wsFeatures.add( new MTOMFeature(true,desc.getMtomThreshold())) ; + wsFeatures.add(new MTOMFeature(true, desc.getMtomThreshold())); } com.sun.enterprise.deployment.Addressing add = desc.getAddressing(); if (add != null) { - wsFeatures.add( new AddressingFeature( - add.isEnabled(),add.isRequired(),getResponse(add.getResponses()))) ; + wsFeatures.add(new AddressingFeature( + add.isEnabled(), add.isRequired(), getResponse(add.getResponses()))); } com.sun.enterprise.deployment.RespectBinding rb = desc.getRespectBinding(); if (rb != null) { - wsFeatures.add( new RespectBindingFeature(rb.isEnabled())) ; + wsFeatures.add(new RespectBindingFeature(rb.isEnabled())); } - Map, Annotation> otherAnnotations = - desc.getOtherAnnotations(); + Map, Annotation> otherAnnotations + = desc.getOtherAnnotations(); Iterator it = otherAnnotations.values().iterator(); - while(it.hasNext()){ - wsFeatures.add(getWebServiceFeatureBean((Annotation)it.next())); + while (it.hasNext()) { + wsFeatures.add(getWebServiceFeatureBean((Annotation) it.next())); } - + return wsFeatures; } private AddressingFeature.Responses getResponse(String s) { - if (s != null) { - return AddressingFeature.Responses.valueOf(AddressingFeature.Responses.class,s); - } else return AddressingFeature.Responses.ALL; - + if (s != null) { + return AddressingFeature.Responses.valueOf(AddressingFeature.Responses.class, s); + } else { + return AddressingFeature.Responses.ALL; + } + } private void resolvePortComponentLinks(ServiceReferenceDescriptor desc) @@ -627,24 +579,24 @@ private void resolvePortComponentLinks(ServiceReferenceDescriptor desc) // // Also set port-qname based on linked port's qname if not // already set. - for(Iterator iter = desc.getPortsInfo().iterator(); iter.hasNext();) { + for (Iterator iter = desc.getPortsInfo().iterator(); iter.hasNext();) { ServiceRefPortInfo portInfo = (ServiceRefPortInfo) iter.next(); - if( portInfo.isLinkedToPortComponent() ) { - WebServiceEndpoint linkedPortComponent = - portInfo.getPortComponentLink(); + if (portInfo.isLinkedToPortComponent()) { + WebServiceEndpoint linkedPortComponent + = portInfo.getPortComponentLink(); // XXX-JD we could at this point try to figure out the // endpoint-address from the ejb wsdl file but it is a // little complicated so I will leave it for post Beta2 - if( !(portInfo.hasWsdlPort()) ) { + if (!(portInfo.hasWsdlPort())) { portInfo.setWsdlPort(linkedPortComponent.getWsdlPort()); } } } } - private WebServiceFeature getWebServiceFeatureBean(Annotation a) { + private WebServiceFeature getWebServiceFeatureBean(Annotation a) { WebServiceFeatureAnnotation wsfa = a.annotationType().getAnnotation(WebServiceFeatureAnnotation.class); Class beanClass = wsfa.bean(); @@ -684,6 +636,4 @@ private WebServiceFeature getWebServiceFeatureBean(Annotation a) { return bean; } - } - diff --git a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WsUtil.java b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WsUtil.java index abb7edf277c..6ca80228089 100644 --- a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WsUtil.java +++ b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WsUtil.java @@ -58,11 +58,6 @@ import jakarta.servlet.http.*; import javax.xml.namespace.QName; -import javax.xml.rpc.ServiceFactory; -import javax.xml.rpc.soap.SOAPFaultException; -import javax.xml.rpc.handler.HandlerInfo; -import javax.xml.rpc.handler.HandlerRegistry; -import jakarta.xml.soap.SOAPConstants; import java.util.*; import java.net.*; import java.util.logging.Logger; @@ -135,16 +130,6 @@ public WsUtil() { config = WebServiceContractImpl.getInstance().getConfig(); } - // @@@ These are jaxrpc-implementation specific MessageContextProperties - // that should be added to jaxrpc spi - private static final String ONE_WAY_OPERATION = - "com.sun.xml.rpc.server.OneWayOperation"; - private static final String CLIENT_BAD_REQUEST = - "com.sun.xml.rpc.server.http.ClientBadRequest"; - - private static final String SECURITY_POLICY_NAMESPACE_URI = - "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; - private static final Logger logger = LogUtils.getLogger(); /** @@ -614,30 +599,6 @@ public void generateFinalWsdl(URL wsdlFileUrl, WebService webService, WebServerI return; } - public HandlerInfo createHandlerInfo(WebServiceHandler handler, - ClassLoader loader) - throws Exception { - - QName[] headers = new QName[handler.getSoapHeaders().size()]; - int i = 0; - for(Iterator iter = handler.getSoapHeaders().iterator(); - iter.hasNext();) { - headers[i] = (QName) iter.next(); - i++; - } - - Map properties = new HashMap(); - for(Iterator iter = handler.getInitParams().iterator(); - iter.hasNext();) { - NameValuePairDescriptor next = (NameValuePairDescriptor) - iter.next(); - properties.put(next.getName(), next.getValue()); - } - - Class handlerClass = loader.loadClass(handler.getHandlerClass()); - return new HandlerInfo(handlerClass, properties, headers); - } - /** * Accessing wsdl URL might involve file system access, so wrap * operation in a doPrivileged block. @@ -818,73 +779,6 @@ public boolean isJAXWSbasedService(WebService ws) { return jaxwsEndPtFound; } - public javax.xml.rpc.Service createConfiguredService - (ServiceReferenceDescriptor desc) throws Exception { - - final ServiceReferenceDescriptor serviceRef = desc; - javax.xml.rpc.Service service = null; - try { - - // Configured service can be created with any kind of URL. - // Since resolving it might require file system access, - // do operation in a doPrivivileged block. JAXRPC RI should - // probably have the doPrivileged as well. - - final URL wsdlFileURL = privilegedGetServiceRefWsdl(serviceRef); - final QName serviceName = serviceRef.getServiceName(); - final ServiceFactory serviceFactory = ServiceFactory.newInstance(); - - service = (javax.xml.rpc.Service) - java.security.AccessController.doPrivileged - (new java.security.PrivilegedExceptionAction() { - public java.lang.Object run() throws Exception { - return serviceFactory.createService - (wsdlFileURL, serviceName); - } - }); - - } catch(PrivilegedActionException pae) { - logger.log(Level.WARNING, LogUtils.EXCEPTION_THROWN, pae); - Exception e = new Exception(); - e.initCause(pae.getCause()); - throw e; - } - - return service; - } - - public void configureHandlerChain(ServiceReferenceDescriptor serviceRef, - javax.xml.rpc.Service service, - Iterator ports, ClassLoader loader) - throws Exception { - - if( !serviceRef.hasHandlers() ) { - return; - } - - HandlerRegistry registry = service.getHandlerRegistry(); - - while(ports.hasNext()) { - QName nextPort = (QName) ports.next(); - - List handlerChain = registry.getHandlerChain(nextPort); - Collection soapRoles = new HashSet(); - - for(Iterator iter = serviceRef.getHandlers().iterator(); - iter.hasNext();) { - WebServiceHandler nextHandler = (WebServiceHandler) iter.next(); - Collection portNames = nextHandler.getPortNames(); - if( portNames.isEmpty() || - portNames.contains(nextPort.getLocalPart()) ) { - soapRoles.addAll(nextHandler.getSoapRoles()); - HandlerInfo handlerInfo = - createHandlerInfo(nextHandler, loader); - handlerChain.add(handlerInfo); - } - } - } - } - /** * Create an xslt template for transforming the packaged webservice * WSDL to a final WSDL. @@ -1042,79 +936,6 @@ private Templates createTemplatesFor(Collection endpoints, return templates; } - /** - * @return Set of service endpoint interface class names supported by - * a generated service interface. - * - * @return Collection of String class names - */ - public Collection getSEIsFromGeneratedService - (Class generatedServiceInterface) throws Exception { - - Collection seis = new HashSet(); - - Method[] declaredMethods = - generatedServiceInterface.getDeclaredMethods(); - - // Use naming convention from jaxrpc spec to derive SEI class name. - for(int i = 0; i < declaredMethods.length; i++) { - Method next = declaredMethods[i]; - Class returnType = next.getReturnType(); - if( next.getName().startsWith("get") && - (next.getDeclaringClass() != javax.xml.rpc.Service.class) && - java.rmi.Remote.class.isAssignableFrom(returnType) ) { - seis.add(returnType.getName()); - } - } - - return seis; - } - - /* *//** - * Called from client side deployment object on receipt of final - * wsdl from server. - * - *@param clientPublishUrl Url of directory on local file system to which - * wsdl is published - * - *@param finalWsdlUri location relative to publish directory where final - * wsdl should be written, in uri form. - * - *@return file to which final wsdl was written - *//* - public File publishFinalWsdl(URL clientPublishUrl, String finalWsdlUri, - byte[] finalWsdlBytes) - throws Exception - { - File finalWsdlFile = null; - FileOutputStream fos = null; - try { - finalWsdlFile = new File - (clientPublishUrl.getFile(), - finalWsdlUri.replace('/', File.separatorChar)); - File parent = finalWsdlFile.getParentFile(); - if( !parent.exists() ) { - boolean madeDirs = parent.mkdirs(); - if( !madeDirs ) { - throw new IOException("Error creating " + parent); - } - } - fos = new FileOutputStream(finalWsdlFile); - fos.write(finalWsdlBytes, 0, finalWsdlBytes.length); - } finally { - if( fos != null ) { - try { - fos.close(); - } catch(IOException ioe) { - logger.log(Level.INFO, "", ioe); - } - } - } - return finalWsdlFile; - } - - */ - public static void raiseException(HttpServletResponse resp, String binding, String faultString) { resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); diff --git a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/monitoring/WebServiceTesterServlet.java b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/monitoring/WebServiceTesterServlet.java index 06fb56ccdc4..8f21d8bb6b6 100644 --- a/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/monitoring/WebServiceTesterServlet.java +++ b/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/monitoring/WebServiceTesterServlet.java @@ -543,7 +543,6 @@ private String wsImport(URL wsdlLocation) throws IOException { if (JDK.getMajor() >= 9) { String modulesDir = System.getProperty("com.sun.aas.installRoot") + File.separator + "modules" + File.separator; wsimportArgs[8] = modulesDir + "jakarta.jws-api.jar"; - wsimportArgs[9] = modulesDir + "jakarta.xml.rpc-api.jar"; wsimportArgs[10] = modulesDir + "webservices-osgi.jar"; wsimportArgs[11] = modulesDir + "jaxb-osgi.jar"; wsimportArgs[12] = modulesDir + "jakarta.xml.ws-api.jar"; diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen index 841bfed89a1..d65220f079e 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen @@ -62,7 +62,7 @@ checkEndorsedAvailable if [ $? -lt 9 ] then - exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@" + exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@" else - exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@" + exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@" fi diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen.bat b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen.bat index 7e7a621719a..2c924130aa9 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen.bat +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/schemagen.bat @@ -60,7 +60,7 @@ set JAVA=java CALL %~dp0jdkcheck.bat if %ENDORSED_AVAILABLE%==true ( - %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade %* + %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade %* ) else ( - %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.jxc.SchemaGeneratorFacade %* + %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.jxc.SchemaGeneratorFacade %* ) diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile index 1f630101efb..60f12cff369 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile @@ -64,7 +64,7 @@ checkEndorsedAvailable if [ $? -lt 9 ] then - exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main "$@" + exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main "$@" else - exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.xml.rpc.tools.wscompile.Main "$@" + exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.xml.rpc.tools.wscompile.Main "$@" fi diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile.bat b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile.bat index 05c50d1cfe7..234381ae30d 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile.bat +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wscompile.bat @@ -61,7 +61,7 @@ set JAVA=java CALL %~dp0jdkcheck.bat if %ENDORSED_AVAILABLE%==true ( - %JAVA% %WSCOMPILE_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main %* + %JAVA% %WSCOMPILE_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main %* ) else ( - %JAVA% %WSCOMPILE_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.xml.rpc.tools.wscompile.Main %* + %JAVA% %WSCOMPILE_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.xml.rpc.tools.wscompile.Main %* ) diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy index ca17884f2cf..77eaeb974d4 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy @@ -64,7 +64,7 @@ checkEndorsedAvailable if [ $? -lt 9 ] then - exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@" + exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@" else - exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@" + exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@" fi diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy.bat b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy.bat index bc678dd4905..705d5a7822f 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy.bat +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsdeploy.bat @@ -61,7 +61,7 @@ set JAVA=java CALL %~dp0jdkcheck.bat if %ENDORSED_AVAILABLE%==true ( - %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main %* + %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main %* ) else ( - %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.xml.rpc.tools.wsdeploy.Main %* + %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.xml.rpc.tools.wsdeploy.Main %* ) diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen index d2a79bd6424..279f3dc94ad 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen @@ -61,7 +61,7 @@ checkEndorsedAvailable if [ $? -lt 9 ] then - exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsGen "$@" + exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsGen "$@" else - exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.tools.ws.WsGen "$@" + exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.tools.ws.WsGen "$@" fi diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen.bat b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen.bat index fb974c05793..bc490220a18 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen.bat +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsgen.bat @@ -60,7 +60,7 @@ set JAVA=java CALL %~dp0jdkcheck.bat if %ENDORSED_AVAILABLE%==true ( - %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsGen %* + %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsGen %* ) else ( - %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.xml.ws-api.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.ws.WsGen %* + %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.xml.ws-api.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.ws.WsGen %* ) diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport index c258fb34f71..8a83e384053 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport @@ -61,7 +61,7 @@ checkEndorsedAvailable if [ $? -lt 9 ] then - exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsImport "$@" + exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsImport "$@" else - exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.tools.ws.WsImport "$@" + exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar" com.sun.tools.ws.WsImport "$@" fi diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport.bat b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport.bat index 8a36076d9d1..05b2e710dd5 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport.bat +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/wsimport.bat @@ -61,7 +61,7 @@ set JAVA=java CALL %~dp0jdkcheck.bat if %ENDORSED_AVAILABLE%==true ( - %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsImport %* + %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsImport %* ) else ( - %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.xml.ws-api.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.ws.WsImport %* + %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.xml.ws-api.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.ws.WsImport %* ) diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc index eafa26b0f49..6eec757a462 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc @@ -61,7 +61,7 @@ checkEndorsedAvailable if [ $? -lt 9 ] then - exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.xjc.Driver "$@" + exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.xjc.Driver "$@" else - exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar" com.sun.tools.xjc.Driver "$@" + exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.jws-api.jar:$AS_INSTALL_LIB/webservices-api-osgi.jar:$AS_INSTALL_LIB/jakarta.activation-api.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar" com.sun.tools.xjc.Driver "$@" fi diff --git a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc.bat b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc.bat index d362d0b6eed..1251d7039c0 100644 --- a/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc.bat +++ b/appserver/webservices/webservices-scripts/src/main/resources/glassfish/bin/xjc.bat @@ -60,7 +60,7 @@ set JAVA=java CALL %~dp0jdkcheck.bat if %ENDORSED_AVAILABLE%==true ( - %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.xjc.Driver %* + %JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.xjc.Driver %* ) else ( - %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jakarta.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.xjc.Driver %* + %JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.jws-api.jar;%~dp0..\modules\webservices-api-osgi.jar;%~dp0..\modules\jakarta.activation-api.jar" com.sun.tools.xjc.Driver %* ) diff --git a/pom.xml b/pom.xml index ce2294ef65f..19e777e14cf 100644 --- a/pom.xml +++ b/pom.xml @@ -191,7 +191,6 @@ 5.0.0 4.2.1 1.0.10 - 1.1.4 2.0.0 1.7.2 2.0.0