/** * Creates an instance of the specified class using the specified * <code>ClassLoader</code> object. * * @exception SOAPException if the given class could not be found * or could not be instantiated */ private static Object newInstance(String className, ClassLoader classLoader, String defaultFactoryClass) throws SOAPException { try { Class spiClass = safeLoadClass(className, classLoader, defaultFactoryClass); return spiClass.newInstance(); } catch (ClassNotFoundException x) { throw new SOAPException( "Provider " + className + " not found", x); } catch (Exception x) { throw new SOAPException( "Provider " + className + " could not be instantiated: " + x, x); } }