You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/11/12 16:52:01 UTC

svn commit: r713408 - in /cxf/branches/2.1.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/classloader/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ rt/databinding/xmlbeans/ rt/databinding/xmlbeans/src/main/java...

Author: dkulp
Date: Wed Nov 12 07:52:00 2008
New Revision: 713408

URL: http://svn.apache.org/viewvc?rev=713408&view=rev
Log:
Merged revisions 711388 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r711388 | dkulp | 2008-11-04 15:42:57 -0500 (Tue, 04 Nov 2008) | 5 lines
  
  Update Seans test to actually use XMLBeans
  Fix codegenerators to grab plugins and such from the correct classloader
  Make the maven plugin cleanup the statics
........

Added:
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/resources/
      - copied from r711388, cxf/trunk/rt/databinding/xmlbeans/src/test/resources/
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/resources/wsdl/
      - copied from r711388, cxf/trunk/rt/databinding/xmlbeans/src/test/resources/wsdl/
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/resources/wsdl/xmlbeanstest.wsdl
      - copied unchanged from r711388, cxf/trunk/rt/databinding/xmlbeans/src/test/resources/wsdl/xmlbeanstest.wsdl
Removed:
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMine.java
    cxf/branches/2.1.x-fixes/testutils/src/main/resources/wsdl/xmlbeanstest.wsdl
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java
    cxf/branches/2.1.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/pom.xml
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java
    cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
    cxf/branches/2.1.x-fixes/rt/ws/rm/pom.xml
    cxf/branches/2.1.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 12 07:52:00 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708417,708550,708554,709353-709354,709425,710076,710150,710154,71149
 0,711975,712194,712198,712238,712272,712299,712312,712893,713082
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708417,708550,708554,709353-709354,709425,710076,710150,710154,71138
 8,711490,711975,712194,712198,712238,712272,712299,712312,712893,713082

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java (original)
+++ cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java Wed Nov 12 07:52:00 2008
@@ -22,6 +22,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
 
 /**
  * This class is extremely useful for loading resources and classes in a fault
@@ -81,6 +84,92 @@
 
         return url;
     }
+    
+    /**
+     * Load a given resources. <p/> This method will try to load the resources
+     * using the following methods (in order):
+     * <ul>
+     * <li>From Thread.currentThread().getContextClassLoader()
+     * <li>From ClassLoaderUtil.class.getClassLoader()
+     * <li>callingClass.getClassLoader()
+     * </ul>
+     * 
+     * @param resourceName The name of the resource to load
+     * @param callingClass The Class object of the calling object
+     */
+    public static List<URL> getResources(String resourceName, Class callingClass) {
+        List<URL> ret = new ArrayList<URL>();
+        Enumeration<URL> urls = new Enumeration<URL>() {
+            public boolean hasMoreElements() {
+                return false;
+            }
+            public URL nextElement() {
+                return null;
+            }
+            
+        };
+        try {
+            urls = Thread.currentThread().getContextClassLoader()
+                .getResources(resourceName);
+        } catch (IOException e) {
+            //ignore
+        }
+        if (!urls.hasMoreElements() && resourceName.startsWith("/")) {
+            //certain classloaders need it without the leading /
+            try {
+                urls = Thread.currentThread().getContextClassLoader()
+                    .getResources(resourceName.substring(1));
+            } catch (IOException e) {
+                // ignore
+            }
+        }
+
+        if (!urls.hasMoreElements()) {
+            try {
+                urls = ClassLoaderUtils.class.getClassLoader().getResources(resourceName);
+            } catch (IOException e) {
+                // ignore
+            }
+        }
+        if (!urls.hasMoreElements() && resourceName.startsWith("/")) {
+            //certain classloaders need it without the leading /
+            try {
+                urls = ClassLoaderUtils.class.getClassLoader()
+                    .getResources(resourceName.substring(1));
+            } catch (IOException e) {
+                // ignore
+            }
+        }
+
+        if (!urls.hasMoreElements()) {
+            ClassLoader cl = callingClass.getClassLoader();
+
+            if (cl != null) {
+                try {
+                    urls = cl.getResources(resourceName);
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+        }
+
+        if (!urls.hasMoreElements()) {
+            URL url = callingClass.getResource(resourceName);
+            if (url != null) {
+                ret.add(url);
+            }
+        }
+        while (urls.hasMoreElements()) {
+            ret.add(urls.nextElement());
+        }
+
+        
+        if (ret.isEmpty() && (resourceName != null) && (resourceName.charAt(0) != '/')) {
+            return getResources('/' + resourceName, callingClass);
+        }
+        return ret;
+    }
+
 
     /**
      * This is a convenience method to load a resource as a stream. <p/> The

Modified: cxf/branches/2.1.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (original)
+++ cxf/branches/2.1.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Wed Nov 12 07:52:00 2008
@@ -205,14 +205,19 @@
 
         try {
             urlList.add(classesDir.toURI().toURL());
+            if (!useCompileClasspath) {
+                urlList.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
+            }
         } catch (MalformedURLException e) {
             //ignore
         }
 
         buf.append(classesDir.getAbsolutePath());
         buf.append(File.pathSeparatorChar);
-
-
+        if (!useCompileClasspath) {
+            buf.append(project.getBuild().getOutputDirectory());
+            buf.append(File.pathSeparatorChar);
+        }
         List artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
         for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
             try {
@@ -232,6 +237,8 @@
         URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
                                                    origContext);
         String newCp = buf.toString();
+        
+        getLog().debug("Classpath: " + urlList.toString());
 
         //with some VM's, creating an XML parser (which we will do to parse wsdls)
         //will set some system properties that then interferes with mavens 
@@ -271,6 +278,7 @@
                 }
             }
             System.getProperties().putAll(origProps);
+            org.apache.cxf.tools.wsdlto.core.PluginLoader.unload();
         }
         if (project != null && sourceRoot != null && sourceRoot.exists()) {
             project.addCompileSourceRoot(sourceRoot.getAbsolutePath());

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/pom.xml?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/pom.xml Wed Nov 12 07:52:00 2008
@@ -156,6 +156,34 @@
                     <javaSource>1.5</javaSource>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-test-sources</id>
+                        <phase>generate-test-sources</phase>
+                        <configuration>
+                            <sourceRoot>target/generated/src/test/java</sourceRoot>
+                            <testWsdlRoot>src/test/resources/wsdl</testWsdlRoot>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                  <wsdl>src/test/resources/wsdl/xmlbeanstest.wsdl</wsdl>
+                                  <dataBinding>xmlbeans</dataBinding>
+                                  <extraargs>
+                                    <arg>-classdir</arg>
+                                    <arg>${basedir}/target/generated/src/test/resources</arg>
+                                  </extraargs>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java Wed Nov 12 07:52:00 2008
@@ -21,6 +21,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -169,6 +170,7 @@
 
             FilerImpl filer = new FilerImpl(classesDir, srcDir,
                                             null, verbose, false) {
+
                 public Writer createSourceFile(String typename) throws IOException {
                     String tn = typename;
                     if (tn.contains("$")) {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java Wed Nov 12 07:52:00 2008
@@ -22,7 +22,10 @@
 import javax.jws.WebService;
 import javax.xml.ws.BindingType;
 
-@WebService(endpointInterface = "org.apache.cxf.xmlbeans.GreeterMine",
+import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
+import org.apache.cxf.xmlbeans.wsdltest.StringListType;
+
+@WebService(endpointInterface = "org.apache.cxf.xmlbeans.wsdltest.GreeterMine",
             targetNamespace = "http://org.apache.cxf/xmlbeans",
             portName = "SoapPort",
             serviceName = "SOAPMineService",

Modified: cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java Wed Nov 12 07:52:00 2008
@@ -26,19 +26,19 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.test.AbstractCXFTest;
-
+import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
+import org.apache.cxf.xmlbeans.wsdltest.SOAPMineService;
+import org.apache.cxf.xmlbeans.wsdltest.StringListType;
 import org.junit.After;
 import org.junit.Before;
-//import org.junit.Ignore;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class XmlBeansTest extends AbstractCXFTest {
 
     private static final String CONFIG1 = "org/apache/cxf/xmlbeans/cxf.xml";
     private static final String CONFIG2 = "org/apache/cxf/xmlbeans/cxf2.xml";
-    private static final String ERROR_MSG = "Service class org.apache.cxf.xmlbeans.GreeterMine method " 
-        +    "sayHi2 part {http://cxf.apache.org/xmlbeans}in cannot be mapped to schema";   
-    private static final String ERROR_MSG2 = "Could not send Message";
+
     private SpringBusFactory bf;
 
     @Before
@@ -58,37 +58,30 @@
     
     
     @Test
+    @Ignore
     public void testBusCreationFails() throws Exception {
-        try {
-            bf = new SpringBusFactory();
-            bus = bf.createBus(CONFIG1);
-            BusFactory.setDefaultBus(bus);
-        } catch (Exception ex) {       
-            assertTrue(ex.getMessage().contains(ERROR_MSG));
-        }
+        bf = new SpringBusFactory();
+        bus = bf.createBus(CONFIG1);
+        BusFactory.setDefaultBus(bus);
     }
 
     @Test
+    @Ignore
     public void testBasicFails() throws Exception {
-        
-        try {
-            bf = new SpringBusFactory();
-            bus = bf.createBus(CONFIG2);
-            BusFactory.setDefaultBus(bus);
-            URL wsdlURL = XmlBeansTest.class.getResource("xmlbeanstest.wsdl");
-            SOAPMineService ss =
-                new SOAPMineService(wsdlURL,
-                                    new QName("http://cxf.apache.org/xmlbeans", "SOAPMineService"));
-            GreeterMine port = ss.getSoapPort();
-
-            StringListType stringListType = new StringListType();
-            stringListType.setMyname("sean");
-            stringListType.setMyaddress("home");
-            port.sayHi2(stringListType);
-        } catch (Exception ex) {          
-            assertTrue(ex.getMessage().contains(ERROR_MSG2));
-            //ex.printStackTrace();
-        }
+
+        bf = new SpringBusFactory();
+        bus = bf.createBus(CONFIG2);
+        BusFactory.setDefaultBus(bus);
+        URL wsdlURL = XmlBeansTest.class.getResource("xmlbeanstest.wsdl");
+        SOAPMineService ss =
+            new SOAPMineService(wsdlURL,
+                                new QName("http://cxf.apache.org/xmlbeans", "SOAPMineService"));
+        GreeterMine port = ss.getSoapPort();
+
+        StringListType stringListType = StringListType.Factory.newInstance();
+        stringListType.setMyname("sean");
+        stringListType.setMyaddress("home");
+        port.sayHi2(stringListType);
     }
     
 

Modified: cxf/branches/2.1.x-fixes/rt/ws/rm/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/ws/rm/pom.xml?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/ws/rm/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/rt/ws/rm/pom.xml Wed Nov 12 07:52:00 2008
@@ -91,41 +91,6 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>cobertura-maven-plugin</artifactId>
-                <configuration>
-                    <instrumentation>
-                        <ignores>
-                            <ignore>org.apache.cxf.ws.rm.manager.*</ignore>
-                        </ignores>
-                        <excludes>
-                            <exclude>org/apache/cxf/ws/rm/AcceptType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/AckRequestedType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/CreateSequenceResponseType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/CreateSequenceType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/Expires.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/Identifier.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/ObjectFactory.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/OfferType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/SequenceAcknowledgement.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/SequenceType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/SequenceFaultType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/TerminateSequenceType.class</exclude>
-                            <exclude>org/apache/cxf/ws/rm/manager/*</exclude>
-                            <exclude>org/apache/cxf/ws/rm/policy/*</exclude>
-                            <exclude>**/*Test.class</exclude>
-                        </excludes>
-                    </instrumentation>
-                </configuration>
-                <executions>
-                  <execution>
-                    <goals>
-                      <goal>clean</goal>
-                    </goals>
-                  </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-common-xsd</artifactId>
                 <version>${project.version}</version>

Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java?rev=713408&r1=713407&r2=713408&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java (original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java Wed Nov 12 07:52:00 2008
@@ -27,7 +27,6 @@
 import java.io.InputStream;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.Enumeration;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -38,6 +37,7 @@
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;
 
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
@@ -79,7 +79,7 @@
         try {
             JAXBContext jc = JAXBContext.newInstance("org.apache.cxf.tools.plugin");
             unmarshaller = jc.createUnmarshaller();
-            loadPlugins(this.classLoader.getResources(PLUGIN_FILE_NAME));
+            loadPlugins(ClassLoaderUtils.getResources(PLUGIN_FILE_NAME, getClass()));
         } catch (JAXBException e) {
             Message msg = new Message("JAXB_CONTEXT_INIT_FAIL", LOG);
             LOG.log(Level.SEVERE, msg.toString());
@@ -103,14 +103,14 @@
         return this.classLoader;
     }
 
-    private void loadPlugins(Enumeration<URL> pluginFiles) throws IOException {
+    private void loadPlugins(List<URL> pluginFiles) throws IOException {
         if (pluginFiles == null) {
             LOG.log(Level.WARNING, "FOUND_NO_PLUGINS");
             return;
         }
 
-        while (pluginFiles.hasMoreElements()) {
-            loadPlugin(pluginFiles.nextElement());
+        for (URL url : pluginFiles) {
+            loadPlugin(url);
         }
     }
 
@@ -128,6 +128,10 @@
         return pluginLoader;
     }
 
+    public static void unload() {
+        pluginLoader = null;
+    }
+
     public void loadPlugin(URL url) throws IOException {
         try {
             LOG.log(Level.FINE, "PLUGIN_LOADING", url);
@@ -303,7 +307,7 @@
     private Processor loadProcessor(String fullClzName) {
         Processor processor = null;
         try {
-            processor = (Processor) Class.forName(fullClzName).newInstance();
+            processor = (Processor) ClassLoaderUtils.loadClass(fullClzName, getClass()).newInstance();
         } catch (Exception e) {
             Message msg = new Message("LOAD_PROCESSOR_FAILED", LOG, fullClzName);
             LOG.log(Level.SEVERE, msg.toString());
@@ -315,7 +319,7 @@
     private Class<? extends ToolContainer> loadContainerClass(String fullClzName) {
         Class<?> clz = null;
         try {
-            clz = Class.forName(fullClzName);
+            clz = ClassLoaderUtils.loadClass(fullClzName, getClass());
         } catch (Exception e) {
             Message msg = new Message("LOAD_CONTAINER_CLASS_FAILED", LOG, fullClzName);
             LOG.log(Level.SEVERE, msg.toString());
@@ -367,7 +371,8 @@
     private AbstractWSDLBuilder<? extends Object> loadBuilder(String fullClzName) {
         AbstractWSDLBuilder<? extends Object> builder = null;
         try {
-            builder = (AbstractWSDLBuilder<? extends Object>) Class.forName(fullClzName).newInstance();
+            builder = (AbstractWSDLBuilder<? extends Object>) ClassLoaderUtils
+                .loadClass(fullClzName, getClass()).newInstance();
 
         } catch (Exception e) {
             Message msg = new Message("LOAD_PROCESSOR_FAILED", LOG, fullClzName);
@@ -420,7 +425,8 @@
     private DataBindingProfile loadDataBindingProfile(String fullClzName) {
         DataBindingProfile profile = null;
         try {
-            profile = (DataBindingProfile) Class.forName(fullClzName).newInstance();
+            profile = (DataBindingProfile)ClassLoaderUtils.loadClass(fullClzName,
+                                                                     getClass()).newInstance();
         } catch (Exception e) {
             Message msg = new Message("DATABINDING_PROFILE_LOAD_FAIL", LOG, fullClzName);
             LOG.log(Level.SEVERE, msg.toString());