dims 2002/06/20 09:48:20 Modified: java/src/org/apache/axis Message.java java/src/org/apache/axis/client Service.java ServiceFactory.java java/src/org/apache/axis/configuration DefaultEngineConfigurationFactory.java java/src/org/apache/axis/deployment/wsdd WSDDDeployableItem.java WSDDService.java WSDDTargetedChain.java WSDDTypeMapping.java java/src/org/apache/axis/deployment/wsdd/providers WSDDComProvider.java WSDDHandlerProvider.java java/src/org/apache/axis/description TypeDesc.java java/src/org/apache/axis/encoding/ser ArrayDeserializer.java BaseDeserializerFactory.java BaseSerializerFactory.java java/src/org/apache/axis/handlers JWSProcessor.java java/src/org/apache/axis/handlers/soap SOAPService.java java/src/org/apache/axis/message SOAPFaultBuilder.java java/src/org/apache/axis/providers/java EJBProvider.java MsgProvider.java java/src/org/apache/axis/server AxisServer.java DefaultAxisServerFactory.java java/src/org/apache/axis/transport/http HTTPSender.java java/src/org/apache/axis/utils JWSClassLoader.java java/src/org/apache/axis/utils/bytecode ExtractorFactory.java java/src/org/apache/axis/utils/cache ClassCache.java java/src/org/apache/axis/utils/compiler CompilerFactory.java Javac.java java/src/org/apache/axis/wsdl/fromJava Emitter.java java/src/org/apache/axis/wsdl/toJava Emitter.java java/test/functional FunctionalTests.java java/test/wsdl/interop3 Interop3TestCase.java java/test/wsdl/refattr RefTestServiceTestCase.java Added: java/src/org/apache/axis/utils ClassUtils.java Log: - Fix for Bug 8423 - AxisClassLoader cannot load service class - Cleanup and centralize class finding mechanism (see loadClass in ClassUtils.java) - Move the Hashtable of ClassLoaders out of JWSClassLoader so that it can be used to register and lookup ANY type of class/classloader. Revision Changes Path 1.70 +4 -4 xml-axis/java/src/org/apache/axis/Message.java Index: Message.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- Message.java 19 Jun 2002 20:00:57 -0000 1.69 +++ Message.java 20 Jun 2002 16:48:17 -0000 1.70 @@ -57,6 +57,7 @@ import org.apache.axis.attachments.Attachments; import org.apache.axis.message.SOAPEnvelope; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; @@ -224,11 +225,10 @@ /** * Attempt to resolve class name, verify that these are present... */ - Class.forName("javax.activation.DataHandler"); - Class.forName("javax.mail.internet.MimeMultipart"); + ClassUtils.forName("javax.activation.DataHandler"); + ClassUtils.forName("javax.mail.internet.MimeMultipart"); - attachImpl = - Class.forName(attachImpName); + attachImpl = ClassUtils.forName(attachImpName); attachmentSupportEnabled = true; } catch (ClassNotFoundException ex) { 1.58 +2 -3 xml-axis/java/src/org/apache/axis/client/Service.java Index: Service.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Service.java,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- Service.java 19 Jun 2002 16:13:16 -0000 1.57 +++ Service.java 20 Jun 2002 16:48:17 -0000 1.58 @@ -59,6 +59,7 @@ import org.apache.axis.AxisEngine; import org.apache.axis.EngineConfiguration; import org.apache.axis.configuration.DefaultEngineConfigurationFactory; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.WSDLUtils; import org.apache.axis.utils.XMLUtils; @@ -307,9 +308,7 @@ pkg = pkg.substring(0, pkg.lastIndexOf('.')); Port port = wsdlService.getPort(portName.getLocalPart()); String binding = port.getBinding().getQName().getLocalPart(); - ClassLoader classLoader = - Thread.currentThread().getContextClassLoader(); - Class stubClass = classLoader.loadClass( + Class stubClass = ClassUtils.forName( pkg + "." + binding + "Stub"); if (proxyInterface.isAssignableFrom(stubClass)) { Class[] formalArgs = {javax.xml.rpc.Service.class}; 1.12 +2 -2 xml-axis/java/src/org/apache/axis/client/ServiceFactory.java Index: ServiceFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceFactory.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ServiceFactory.java 13 Jun 2002 18:47:41 -0000 1.11 +++ ServiceFactory.java 20 Jun 2002 16:48:17 -0000 1.12 @@ -59,7 +59,7 @@ import org.apache.axis.EngineConfiguration; import org.apache.axis.configuration.DefaultEngineConfigurationFactory; - +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import javax.naming.Context; @@ -177,7 +177,7 @@ // If an explicit service classname is provided, then this is a // generated Service class. Just use its default constructor. if (addr != null && (obj = addr.getContent()) instanceof String) { - instance = Class.forName((String) obj).newInstance(); + instance = ClassUtils.forName((String) obj).newInstance(); } // else this is an instance of the Service class, so grab the // reference data... 1.12 +3 -2 xml-axis/java/src/org/apache/axis/configuration/DefaultEngineConfigurationFactory.java Index: DefaultEngineConfigurationFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/DefaultEngineConfigurationFactory.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DefaultEngineConfigurationFactory.java 4 Jun 2002 22:58:32 -0000 1.11 +++ DefaultEngineConfigurationFactory.java 20 Jun 2002 16:48:18 -0000 1.12 @@ -58,6 +58,7 @@ import org.apache.axis.AxisEngine; import org.apache.axis.EngineConfigurationFactory; import org.apache.axis.EngineConfiguration; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; @@ -100,8 +101,8 @@ if (fClassName != null) { try { - userFactory = (EngineConfigurationFactory)Class. - forName(fClassName).newInstance(); + userFactory = (EngineConfigurationFactory) + ClassUtils.forName(fClassName).newInstance(); } catch (Exception e) { // Report diagnostics but use the default factory. log.error(JavaUtils.getMessage("exception00"), e); 1.36 +2 -1 xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployableItem.java Index: WSDDDeployableItem.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployableItem.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- WSDDDeployableItem.java 11 Jun 2002 14:53:52 -0000 1.35 +++ WSDDDeployableItem.java 20 Jun 2002 16:48:18 -0000 1.36 @@ -64,6 +64,7 @@ import org.apache.axis.deployment.DeploymentException; import org.apache.axis.providers.java.JavaProvider; import org.apache.axis.utils.LockableHashtable; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.apache.commons.logging.Log; @@ -384,7 +385,7 @@ QName type = getType(); if (type != null && URI_WSDD_JAVA.equals(type.getNamespaceURI())) { - return Class.forName(type.getLocalPart()); + return ClassUtils.forName(type.getLocalPart()); } return null; } 1.71 +2 -3 xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java Index: WSDDService.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- WSDDService.java 11 Jun 2002 14:53:52 -0000 1.70 +++ WSDDService.java 20 Jun 2002 16:48:18 -0000 1.71 @@ -73,6 +73,7 @@ import org.apache.axis.enum.Style; import org.apache.axis.handlers.soap.SOAPService; import org.apache.axis.providers.java.JavaProvider; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.w3c.dom.Element; @@ -207,9 +208,7 @@ String className = this.getParameter(JavaProvider.OPTION_CLASSNAME); if (className != null) { try { - // Will this always be the right classloader? - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Class cls = cl.loadClass(className); + Class cls = ClassUtils.forName(className); desc.setImplClass(cls); initTMR(); desc.setTypeMapping(getTypeMapping(desc.getStyle().getEncoding())); 1.12 +2 -1 xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTargetedChain.java Index: WSDDTargetedChain.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTargetedChain.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- WSDDTargetedChain.java 11 Jun 2002 14:53:53 -0000 1.11 +++ WSDDTargetedChain.java 20 Jun 2002 16:48:18 -0000 1.12 @@ -59,6 +59,7 @@ import org.apache.axis.EngineConfiguration; import org.apache.axis.ConfigurationException; import org.apache.axis.encoding.SerializationContext; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.apache.axis.transport.http.HTTPSender; @@ -199,7 +200,7 @@ if (pivotQName != null) { if (URI_WSDD_JAVA.equals(pivotQName.getNamespaceURI())) { try { - pivot = (Handler)Class.forName(pivotQName.getLocalPart()).newInstance(); + pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance(); } catch (InstantiationException e) { throw new ConfigurationException(e); } catch (IllegalAccessException e) { 1.31 +4 -6 xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMapping.java Index: WSDDTypeMapping.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMapping.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- WSDDTypeMapping.java 11 Jun 2002 14:53:53 -0000 1.30 +++ WSDDTypeMapping.java 20 Jun 2002 16:48:18 -0000 1.31 @@ -56,6 +56,7 @@ import org.apache.axis.Constants; import org.apache.axis.encoding.SerializationContext; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.w3c.dom.Element; @@ -218,8 +219,7 @@ if (JavaUtils.getWrapper(loadName) != null) { // We're } - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - return Class.forName(loadName, true, cl); + return ClassUtils.forName(loadName); } throw new ClassNotFoundException(JavaUtils.getMessage("noTypeQName00")); @@ -253,8 +253,7 @@ public Class getSerializer() throws ClassNotFoundException { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - return Class.forName(serializer, true, cl); + return ClassUtils.forName(serializer); } /** @@ -291,8 +290,7 @@ public Class getDeserializer() throws ClassNotFoundException { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - return Class.forName(deserializer, true, cl); + return ClassUtils.forName(deserializer); } /** 1.18 +2 -1 xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDComProvider.java Index: WSDDComProvider.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDComProvider.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- WSDDComProvider.java 28 Jan 2002 18:23:01 -0000 1.17 +++ WSDDComProvider.java 20 Jun 2002 16:48:18 -0000 1.18 @@ -61,6 +61,7 @@ import org.apache.axis.deployment.wsdd.WSDDService; import org.apache.axis.providers.BasicProvider; import org.apache.axis.providers.ComProvider; +import org.apache.axis.utils.ClassUtils; import org.w3c.dom.Element; @@ -74,7 +75,7 @@ EngineConfiguration registry) throws Exception { - Class _class = Class.forName("org.apache.axis.handlers.providers.ComProvider"); + Class _class = ClassUtils.forName("org.apache.axis.handlers.providers.ComProvider"); BasicProvider provider = (BasicProvider) _class.newInstance(); 1.5 +2 -2 xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDHandlerProvider.java Index: WSDDHandlerProvider.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/providers/WSDDHandlerProvider.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WSDDHandlerProvider.java 28 Jan 2002 18:23:01 -0000 1.4 +++ WSDDHandlerProvider.java 20 Jun 2002 16:48:18 -0000 1.5 @@ -61,7 +61,7 @@ import org.apache.axis.deployment.DeploymentRegistry; import org.apache.axis.deployment.wsdd.WSDDProvider; import org.apache.axis.deployment.wsdd.WSDDService; - +import org.apache.axis.utils.ClassUtils; /** * This is a simple provider for using Handler-based services which don't @@ -82,7 +82,7 @@ getMessage("noHandlerClass00")); } - Class _class = Class.forName(providerClass); + Class _class = ClassUtils.forName(providerClass); if (!(Handler.class.isAssignableFrom(_class))) { throw new DeploymentException(JavaUtils. 1.15 +2 -2 xml-axis/java/src/org/apache/axis/description/TypeDesc.java Index: TypeDesc.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/TypeDesc.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- TypeDesc.java 19 Jun 2002 16:13:16 -0000 1.14 +++ TypeDesc.java 20 Jun 2002 16:48:18 -0000 1.15 @@ -55,6 +55,7 @@ package org.apache.axis.description; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import javax.xml.namespace.QName; @@ -98,8 +99,7 @@ } catch (NoSuchMethodException e) {} if (getTypeDesc == null) { // Look for a Helper Class - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Class helper = Class.forName(cls.getName() + "_Helper", true, cl); + Class helper = ClassUtils.forName(cls.getName() + "_Helper"); try { getTypeDesc = helper.getMethod("getTypeDesc", noClasses); 1.19 +3 -5 xml-axis/java/src/org/apache/axis/encoding/ser/ArrayDeserializer.java Index: ArrayDeserializer.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ArrayDeserializer.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ArrayDeserializer.java 18 Jun 2002 16:53:10 -0000 1.18 +++ ArrayDeserializer.java 20 Jun 2002 16:48:18 -0000 1.19 @@ -61,6 +61,7 @@ import org.apache.axis.encoding.DeserializerImpl; import org.apache.axis.encoding.DeserializerTarget; import org.apache.axis.message.SOAPHandler; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -237,13 +238,10 @@ getClassForQName(compQName); if (arrayItemClass != null) { try { - ClassLoader cl = - context.getMessageContext().getClassLoader(); - arrayClass = Class.forName( + arrayClass = ClassUtils.forName( JavaUtils.getLoadableClassName( JavaUtils.getTextClassName(arrayItemClass.getName()) + - dims), - true, cl); + dims)); } catch (Exception e) { throw new SAXException( JavaUtils.getMessage("noComponent00", 1.6 +3 -4 xml-axis/java/src/org/apache/axis/encoding/ser/BaseDeserializerFactory.java Index: BaseDeserializerFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BaseDeserializerFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BaseDeserializerFactory.java 11 Jun 2002 14:53:55 -0000 1.5 +++ BaseDeserializerFactory.java 20 Jun 2002 16:48:18 -0000 1.6 @@ -58,6 +58,7 @@ import org.apache.axis.Constants; import org.apache.axis.encoding.Deserializer; import org.apache.axis.encoding.DeserializerFactory; +import org.apache.axis.utils.ClassUtils; import javax.xml.namespace.QName; import javax.xml.rpc.JAXRPCException; @@ -168,10 +169,8 @@ } catch (NoSuchMethodException e) {} if (getDeserializer == null) { try { - ClassLoader cl = - Thread.currentThread().getContextClassLoader(); - Class helper = Class.forName( - javaType.getName() + "_Helper", true, cl); + Class helper = ClassUtils.forName( + javaType.getName() + "_Helper"); getDeserializer = helper.getMethod("getDeserializer", new Class[] {String.class, 1.10 +3 -4 xml-axis/java/src/org/apache/axis/encoding/ser/BaseSerializerFactory.java Index: BaseSerializerFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BaseSerializerFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- BaseSerializerFactory.java 11 Jun 2002 14:53:55 -0000 1.9 +++ BaseSerializerFactory.java 20 Jun 2002 16:48:18 -0000 1.10 @@ -66,6 +66,7 @@ import java.util.Iterator; import org.apache.axis.Constants; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.encoding.Serializer; import org.apache.axis.encoding.SerializerFactory; @@ -192,10 +193,8 @@ } catch (NoSuchMethodException e) {} if (getSerializer == null) { try { - ClassLoader cl = - Thread.currentThread().getContextClassLoader(); - Class helper = Class.forName( - javaType.getName() + "_Helper", true, cl); + Class helper = ClassUtils.forName( + javaType.getName() + "_Helper"); getSerializer = helper.getMethod("getSerializer", new Class[] {String.class, 1.51 +4 -3 xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java Index: JWSProcessor.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- JWSProcessor.java 11 Jun 2002 13:26:15 -0000 1.50 +++ JWSProcessor.java 20 Jun 2002 16:48:19 -0000 1.51 @@ -63,6 +63,7 @@ import org.apache.axis.transport.http.HTTPConstants; import org.apache.axis.enum.Scope; import org.apache.axis.utils.JWSClassLoader; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.apache.axis.utils.compiler.Compiler; @@ -251,12 +252,12 @@ JavaUtils.getMessage("badCompile00", jFile), null, new Element[] { root } ); } - JWSClassLoader.removeClassLoader( clsName ); + ClassUtils.removeClassLoader( clsName ); // And clean out the cached service. soapServices.remove(clsName); } - JWSClassLoader cl = JWSClassLoader.getClassLoader(clsName); + ClassLoader cl = ClassUtils.getClassLoader(clsName); if (cl == null) { cl = new JWSClassLoader(clsName, msgContext.getClassLoader(), @@ -288,7 +289,7 @@ // Set up service description ServiceDesc sd = rpc.getServiceDescription(); - sd.setImplClass(cl.loadClass(clsName)); + sd.setImplClass(ClassUtils.forName(clsName, true, cl)); sd.setTypeMapping(msgContext.getTypeMapping()); soapServices.put(clsName, rpc); 1.67 +2 -1 xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java Index: SOAPService.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- SOAPService.java 11 Jun 2002 14:53:58 -0000 1.66 +++ SOAPService.java 20 Jun 2002 16:48:19 -0000 1.67 @@ -71,6 +71,7 @@ import org.apache.axis.handlers.BasicHandler; import org.apache.axis.message.SOAPEnvelope; import org.apache.axis.message.SOAPHeaderElement; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.LockableHashtable; import org.apache.axis.utils.XMLUtils; @@ -294,7 +295,7 @@ } } else { try { - Class cls = cl.loadClass(clsName); + Class cls = ClassUtils.forName(clsName,true,cl); serviceDescription.setImplClass(cls); } catch (ClassNotFoundException e) { log.error(JavaUtils.getMessage("exception00"), e); 1.22 +2 -2 xml-axis/java/src/org/apache/axis/message/SOAPFaultBuilder.java Index: SOAPFaultBuilder.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPFaultBuilder.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- SOAPFaultBuilder.java 11 Jun 2002 14:53:59 -0000 1.21 +++ SOAPFaultBuilder.java 20 Jun 2002 16:48:19 -0000 1.22 @@ -60,6 +60,7 @@ import org.apache.axis.encoding.Deserializer; import org.apache.axis.encoding.Callback; import org.apache.axis.encoding.CallbackTarget; +import org.apache.axis.utils.ClassUtils; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.w3c.dom.Element; @@ -115,8 +116,7 @@ AxisFault f = null; if (faultClassName != null) { try { - ClassLoader cl = context.getMessageContext().getClassLoader(); - Class exClass = Class.forName(faultClassName, true, cl); + Class exClass = ClassUtils.forName(faultClassName); if (AxisFault.class.isAssignableFrom(exClass)) { f = (AxisFault) exClass.newInstance(); f.setFaultCode(faultCode); 1.20 +4 -3 xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java Index: EJBProvider.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- EJBProvider.java 20 May 2002 21:54:03 -0000 1.19 +++ EJBProvider.java 20 Jun 2002 16:48:19 -0000 1.20 @@ -62,6 +62,7 @@ import org.apache.axis.Handler; import org.apache.axis.MessageContext; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import javax.naming.Context; @@ -127,7 +128,7 @@ msgContext.getTargetService())); // Load the Home class name given in the config file - Class homeClass = msgContext.getClassLoader().loadClass(homeName); + Class homeClass = ClassUtils.forName(homeName, true, msgContext.getClassLoader()); // Make sure the object we got back from JNDI is the same type // as the what is specified in the config file @@ -188,7 +189,7 @@ String remoteName = (String) getStrOption(OPTION_REMOTEINTERFACENAME, serviceHandler); if(remoteName != null){ - interfaceClass = msgContext.getClassLoader().loadClass(remoteName); + interfaceClass = ClassUtils.forName(remoteName, true, msgContext.getClassLoader()); } else { @@ -204,7 +205,7 @@ msgContext.getTargetService())); // Load the Home class name given in the config file - Class homeClass = msgContext.getClassLoader().loadClass(homeName); + Class homeClass = ClassUtils.forName(homeName, true, msgContext.getClassLoader()); // Make sure the object we got back from JNDI is the same type // as the what is specified in the config file 1.26 +4 -3 xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java Index: MsgProvider.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- MsgProvider.java 30 Apr 2002 19:07:31 -0000 1.25 +++ MsgProvider.java 20 Jun 2002 16:48:19 -0000 1.26 @@ -59,6 +59,7 @@ import org.apache.axis.MessageContext; import org.apache.axis.message.SOAPBodyElement; import org.apache.axis.message.SOAPEnvelope; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.cache.JavaClass; import org.w3c.dom.Document; @@ -134,7 +135,7 @@ ///////////////////////////////////////////////////////////////// argClasses = new Class[1]; argObjects = new Object[1]; - argClasses[0] = clsLoader.loadClass("java.util.Vector"); + argClasses[0] = ClassUtils.forName("java.util.Vector", true, clsLoader); argObjects[0] = bodies ; try { @@ -154,7 +155,7 @@ ///////////////////////////////////////////////////////////////// argClasses = new Class[1]; argObjects = new Object[1]; - argClasses[0] = clsLoader.loadClass("org.w3c.dom.Document"); + argClasses[0] = ClassUtils.forName("org.w3c.dom.Document", true, clsLoader); argObjects[0] = doc ; try { @@ -175,7 +176,7 @@ // pass *just* the MessageContext (maybe don't even parse!!!) argClasses = new Class[1]; argObjects = new Object[1]; - argClasses[0] = clsLoader.loadClass("org.apache.axis.MessageContext"); + argClasses[0] = ClassUtils.forName("org.apache.axis.MessageContext", true, clsLoader); argObjects[0] = msgContext ; try { method = jc.getJavaClass().getMethod( methodName, argClasses ); 1.68 +4 -3 xml-axis/java/src/org/apache/axis/server/AxisServer.java Index: AxisServer.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- AxisServer.java 4 Jun 2002 22:58:32 -0000 1.67 +++ AxisServer.java 20 Jun 2002 16:48:19 -0000 1.68 @@ -64,6 +64,7 @@ import org.apache.axis.SimpleTargetedChain; import org.apache.axis.client.AxisClient; import org.apache.axis.configuration.DefaultEngineConfigurationFactory; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -87,7 +88,7 @@ String factoryClassName = getGlobalProperty("axis.ServerFactory"); if (factoryClassName != null) { try { - Class factoryClass = Class.forName(factoryClassName); + Class factoryClass = ClassUtils.forName(factoryClassName); if (AxisServerFactory.class.isAssignableFrom(factoryClass)) factory = (AxisServerFactory)factoryClass.newInstance(); } catch (Exception e) { @@ -187,7 +188,7 @@ ClassLoader cl = msgContext.getClassLoader(); try { log.debug( JavaUtils.getMessage("tryingLoad00", hName) ); - Class cls = cl.loadClass( hName ); + Class cls = ClassUtils.forName(hName, true, cl); h = (Handler) cls.newInstance(); } catch( Exception e ) { @@ -344,7 +345,7 @@ ClassLoader cl = msgContext.getClassLoader(); try { log.debug( JavaUtils.getMessage("tryingLoad00", hName) ); - Class cls = cl.loadClass( hName ); + Class cls = ClassUtils.forName(hName, true, cl); h = (Handler) cls.newInstance(); } catch( Exception e ) { 1.9 +2 -1 xml-axis/java/src/org/apache/axis/server/DefaultAxisServerFactory.java Index: DefaultAxisServerFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/DefaultAxisServerFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- DefaultAxisServerFactory.java 4 Jun 2002 22:58:32 -0000 1.8 +++ DefaultAxisServerFactory.java 20 Jun 2002 16:48:19 -0000 1.9 @@ -58,6 +58,7 @@ import org.apache.axis.EngineConfiguration; import org.apache.axis.AxisFault; import org.apache.axis.AxisEngine; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; @@ -181,7 +182,7 @@ // Got one - so try to make it (which means it had better have // a default constructor - may make it possible later to pass // in some kind of environmental parameters...) - Class cls = Class.forName(configClass); + Class cls = ClassUtils.forName(configClass); config = (EngineConfiguration)cls.newInstance(); } catch (ClassNotFoundException e) { log.warn(JavaUtils.getMessage("engineConfigNoClass00", configClass), e); 1.69 +4 -3 xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java Index: HTTPSender.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- HTTPSender.java 18 Jun 2002 16:05:01 -0000 1.68 +++ HTTPSender.java 20 Jun 2002 16:48:19 -0000 1.69 @@ -60,6 +60,7 @@ import org.apache.axis.MessageContext; import org.apache.axis.encoding.Base64; import org.apache.axis.handlers.BasicHandler; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.apache.commons.logging.Log; @@ -209,8 +210,8 @@ try { // Use java reflection to create a secure socket. - Class SSLSocketFactoryClass = Class.forName("javax.net.ssl.SSLSocketFactory"); - Class SSLSocketClass = Class.forName("javax.net.ssl.SSLSocket"); + Class SSLSocketFactoryClass = ClassUtils.forName("javax.net.ssl.SSLSocketFactory"); + Class SSLSocketClass = ClassUtils.forName("javax.net.ssl.SSLSocket"); Method createSocketMethod = SSLSocketFactoryClass.getMethod("createSocket", new Class[]{String.class, @@ -226,7 +227,7 @@ String socketFactoryClass = AxisEngine.getGlobalProperty("axis.socketFactory"); if (socketFactoryClass != null) { try { - Class c1 = Class.forName(socketFactoryClass); + Class c1 = ClassUtils.forName(socketFactoryClass); SocketFactoryFactory sff = (SocketFactoryFactory) c1.newInstance(); factory = sff.createFactory(); if (log.isDebugEnabled()) { 1.5 +1 -24 xml-axis/java/src/org/apache/axis/utils/JWSClassLoader.java Index: JWSClassLoader.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/JWSClassLoader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JWSClassLoader.java 19 Jun 2002 23:14:41 -0000 1.4 +++ JWSClassLoader.java 20 Jun 2002 16:48:19 -0000 1.5 @@ -67,7 +67,6 @@ * @author Doug Davis ([EMAIL PROTECTED]) */ public class JWSClassLoader extends ClassLoader { - private static Hashtable classloaders = new Hashtable(); private String classFile = null; private String name = null; @@ -106,29 +105,7 @@ // Class cls = defineClass( name, data, 0, data.length ); - classloaders.put(name, this); - } - - /** - * Obtain the JWSClassLoader (if any) associated with the given - * className. - * - * @param className the name of a class - */ - public static JWSClassLoader getClassLoader(String className) - { - if (className == null) return null; - return (JWSClassLoader)classloaders.get(className); - } - - /** - * Deregister the JWSClassLoader for a given className. - * - * @param className the name of a class - */ - public static void removeClassLoader(String className) - { - classloaders.remove(className); + ClassUtils.setClassLoader(name,this); } /** 1.1 xml-axis/java/src/org/apache/axis/utils/ClassUtils.java Index: ClassUtils.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.axis.utils; /** * Utility methods for Class Loading. * * @author Davanum Srinvas ([EMAIL PROTECTED]) */ public final class ClassUtils { /** hash table of class loaders */ private static java.util.Hashtable classloaders = new java.util.Hashtable(); /** * Set the ClassLoader associated with the given className. * * @param className the name of a class */ public static void setClassLoader(String className, ClassLoader loader) { if (className != null && loader != null) classloaders.put(className, loader); } /** * Obtain the ClassLoader (if any) associated with the given * className. * * @param className the name of a class * @return class loader */ public static ClassLoader getClassLoader(String className) { if (className == null) return null; return (ClassLoader) classloaders.get(className); } /** * Deregister the ClassLoader for a given className. * * @param className the name of a class */ public static void removeClassLoader(String className) { classloaders.remove(className); } /** * Use this method instead of Class.forName * * @param className Class name * @return java class * @throws ClassNotFoundException if the class is not found */ public static Class forName(String className) throws ClassNotFoundException { return loadClass(className); } /** * Use this method instead of Class.forName (String className, boolean init, ClassLoader loader) * * @param className Class name * @param init initialize the class * @param loader class loader * @return java class * * @throws ClassNotFoundException if the class is not found */ public static Class forName( String className, boolean init, ClassLoader loader) throws ClassNotFoundException { try { return Class.forName(className, true, loader); } catch (ClassNotFoundException cnfe) { return loadClass(className); } } /** * Loads the class from the context class loader and then falls back to Class.forName * * @param className Class name * @return java class * @throws ClassNotFoundException if the class is not found */ private static Class loadClass(String className) throws ClassNotFoundException { try { // Check if the class is a registered class then // use the classloader for that class. ClassLoader classLoader = getClassLoader(className); return Class.forName(className, true, classLoader); } catch (ClassNotFoundException cnfe) { } try { // Try the context class loader ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return Class.forName(className, true, classLoader); } catch (ClassNotFoundException cnfe2) { try { // Try the classloader that loaded this class. ClassLoader classLoader = ClassUtils.class.getClassLoader(); return Class.forName(className, true, classLoader); } catch (ClassNotFoundException cnfe3) { // Try the default class loader. return Class.forName(className); } } } } 1.2 +3 -2 xml-axis/java/src/org/apache/axis/utils/bytecode/ExtractorFactory.java Index: ExtractorFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/bytecode/ExtractorFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ExtractorFactory.java 2 Apr 2002 19:07:17 -0000 1.1 +++ ExtractorFactory.java 20 Jun 2002 16:48:19 -0000 1.2 @@ -55,6 +55,7 @@ package org.apache.axis.utils.bytecode; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -74,7 +75,7 @@ log.debug("axis.Extractor:" + extractorClassName); Extractor extractor = null; try { - Class extractorClass = Class.forName(extractorClassName); + Class extractorClass = ClassUtils.forName(extractorClassName); if (Extractor.class.isAssignableFrom(extractorClass)) return (Extractor) extractorClass.newInstance(); } catch (Exception e) { 1.3 +2 -1 xml-axis/java/src/org/apache/axis/utils/cache/ClassCache.java Index: ClassCache.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/cache/ClassCache.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClassCache.java 20 Feb 2002 18:59:22 -0000 1.2 +++ ClassCache.java 20 Jun 2002 16:48:19 -0000 1.3 @@ -54,6 +54,7 @@ package org.apache.axis.utils.cache; +import org.apache.axis.utils.ClassUtils; import java.util.Hashtable; /** @@ -118,7 +119,7 @@ JavaClass jc = (JavaClass) classCache.get(className); if ((jc == null) && (cl != null)) { // Try to load the class with the specified classloader - Class cls = cl.loadClass(className); + Class cls = ClassUtils.forName(className, true, cl); jc = new JavaClass(cls); } return jc; 1.7 +3 -2 xml-axis/java/src/org/apache/axis/utils/compiler/CompilerFactory.java Index: CompilerFactory.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/compiler/CompilerFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CompilerFactory.java 15 Mar 2002 01:14:11 -0000 1.6 +++ CompilerFactory.java 20 Jun 2002 16:48:20 -0000 1.7 @@ -55,6 +55,7 @@ package org.apache.axis.utils.compiler; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; @@ -77,7 +78,7 @@ log.debug("axis.Compiler:" + compilerClassName); if (compilerClassName != null) { try { - Class compilerClass = Class.forName(compilerClassName); + Class compilerClass = ClassUtils.forName(compilerClassName); if (Compiler.class.isAssignableFrom(compilerClass)) return (Compiler)compilerClass.newInstance(); } catch (Exception e) { 1.9 +5 -4 xml-axis/java/src/org/apache/axis/utils/compiler/Javac.java Index: Javac.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/compiler/Javac.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Javac.java 5 Jun 2002 18:53:41 -0000 1.8 +++ Javac.java 20 Jun 2002 16:48:20 -0000 1.9 @@ -55,6 +55,7 @@ package org.apache.axis.utils.compiler; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -95,12 +96,12 @@ // Use reflection to be able to build on all JDKs ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { - cl.loadClass(MODERN_CLASS); + ClassUtils.forName(MODERN_CLASS, true, cl); modern = true; } catch (ClassNotFoundException e) { log.debug(JavaUtils.getMessage("noModernCompiler")); try { - cl.loadClass(CLASSIC_CLASS); + ClassUtils.forName(CLASSIC_CLASS, true, cl); modern = false; } catch (Exception ex) { log.error(JavaUtils.getMessage("noCompiler00"), ex); @@ -126,7 +127,7 @@ try { // Create an instance of the compiler, redirecting output to err - Class c = Class.forName("sun.tools.javac.Main"); + Class c = ClassUtils.forName("sun.tools.javac.Main"); Constructor cons = c.getConstructor(new Class[] { OutputStream.class, String.class }); 1.42 +3 -2 xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java Index: Emitter.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- Emitter.java 19 Jun 2002 13:47:09 -0000 1.41 +++ Emitter.java 20 Jun 2002 16:48:20 -0000 1.42 @@ -72,6 +72,7 @@ import org.apache.axis.description.ParameterDesc; import org.apache.axis.description.FaultDesc; import org.apache.axis.encoding.*; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.XMLUtils; import org.w3c.dom.Document; @@ -1081,7 +1082,7 @@ * @param className the name of the <code>Class</code> to export */ public void setCls(String className) throws ClassNotFoundException { - cls = Class.forName(className); + cls = ClassUtils.forName(className); } /** @@ -1106,7 +1107,7 @@ */ public void setImplCls(String className) { try { - implCls = Class.forName(className); + implCls = ClassUtils.forName(className); } catch (Exception ex) { ex.printStackTrace(); 1.43 +2 -1 xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java Index: Emitter.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- Emitter.java 11 Jun 2002 14:54:01 -0000 1.42 +++ Emitter.java 20 Jun 2002 16:48:20 -0000 1.43 @@ -73,6 +73,7 @@ import org.apache.axis.enum.Scope; +import org.apache.axis.utils.ClassUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.wsdl.gen.GeneratorFactory; @@ -287,7 +288,7 @@ try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); setFactory((GeneratorFactory) - Class.forName(factory, true, cl).newInstance()); + ClassUtils.forName(factory).newInstance()); } catch (Exception ex) { ex.printStackTrace(); 1.22 +5 -3 xml-axis/java/test/functional/FunctionalTests.java Index: FunctionalTests.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/functional/FunctionalTests.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- FunctionalTests.java 30 May 2002 16:40:42 -0000 1.21 +++ FunctionalTests.java 20 Jun 2002 16:48:20 -0000 1.22 @@ -1,5 +1,7 @@ package test.functional; +import org.apache.axis.utils.ClassUtils; + import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; @@ -60,9 +62,9 @@ // Attachments service test. try{ - if( null != Class.forName("javax.activation.DataHandler") && - null != Class.forName("javax.mail.internet.MimeMultipart")){ - suite.addTestSuite( Class.forName("test.functional.TestAttachmentsSample")); + if( null != ClassUtils.forName("javax.activation.DataHandler") && + null != ClassUtils.forName("javax.mail.internet.MimeMultipart")){ + suite.addTestSuite( ClassUtils.forName("test.functional.TestAttachmentsSample")); } }catch( Throwable t){;} 1.2 +3 -1 xml-axis/java/test/wsdl/interop3/Interop3TestCase.java Index: Interop3TestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/Interop3TestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Interop3TestCase.java 28 Feb 2002 20:05:14 -0000 1.1 +++ Interop3TestCase.java 20 Jun 2002 16:48:20 -0000 1.2 @@ -1,5 +1,7 @@ package test.wsdl.interop3; +import org.apache.axis.utils.ClassUtils; + import java.io.FileInputStream; import java.lang.reflect.Field; @@ -33,7 +35,7 @@ String key = (String) it.next(); URL value = new URL((String) props.get(key)); try { - Class test = Class.forName(key); + Class test = ClassUtils.forName(key); Field urlField = test.getField("url"); urlField.set(null, value); TestRunner.run(new TestSuite(test)); 1.4 +3 -1 xml-axis/java/test/wsdl/refattr/RefTestServiceTestCase.java Index: RefTestServiceTestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/refattr/RefTestServiceTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RefTestServiceTestCase.java 5 Feb 2002 16:22:40 -0000 1.3 +++ RefTestServiceTestCase.java 20 Jun 2002 16:48:20 -0000 1.4 @@ -8,6 +8,8 @@ package test.wsdl.refattr; +import org.apache.axis.utils.ClassUtils; + public class RefTestServiceTestCase extends junit.framework.TestCase { public RefTestServiceTestCase(String name) { super(name); @@ -35,7 +37,7 @@ Mangle_Type mangle_type = new Mangle_Type(); Mangle_ElemType mangle_elem_type = new Mangle_ElemType(); try { - Class cls = Class.forName("test.wsdl.refattr.Mangle"); + Class cls = ClassUtils.forName("test.wsdl.refattr.Mangle"); assertTrue("Found unmangled class test.wsdl.refattr.Mangle", false); } catch (Exception e) { // Okay expect to get an exception