cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r578944 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/wsdl/ common/common/src/main/java/org/apache/cxf/common/i18n/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ maven-plugins/java2ws-plugin/ parent/ ...
Date Mon, 24 Sep 2007 20:16:12 GMT
Author: dkulp
Date: Mon Sep 24 13:15:55 2007
New Revision: 578944

URL: http://svn.apache.org/viewvc?rev=578944&view=rev
Log:
Changes to codegen plugin to create a context ClassLoader with all the deps of the project
so URL's like "classpath:blah.wsdl" will work
Fix all kinds of places where context classloader was not being used
Make maven plugin shutdown the bus so a new bus (with new list of deps and new context classloader)
will be used for second runs in multi-project builds
Enable the "proper" headers tests in systest (since soapbinding is now loaded from the context)
Fix issues with  ResourceBundles if class is from the context classloader instead of system
classloader

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/i18n/BundleUtils.java
    incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    incubator/cxf/trunk/maven-plugins/java2ws-plugin/   (props changed)
    incubator/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml
    incubator/cxf/trunk/parent/pom.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
    incubator/cxf/trunk/systests/pom.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
    incubator/cxf/trunk/tools/javato/ws/pom.xml
    incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
    incubator/cxf/trunk/tools/javato/ws/src/test/resources/java2wsdl_wsdl/hello_world_bare.wsdl
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java Mon
Sep 24 13:15:55 2007
@@ -73,7 +73,8 @@
         JAXBExtensionHelper helper = new JAXBExtensionHelper(cls);
         
         try {
-            Class<?> objectFactory = Class.forName(PackageUtils.getPackageName(cls)
+ ".ObjectFactory");
+            Class<?> objectFactory = Class.forName(PackageUtils.getPackageName(cls)
+ ".ObjectFactory",
+                                                   true, cls.getClassLoader());
             Method methods[] = objectFactory.getDeclaredMethods();
             for (Method method : methods) {
                 if (method.getParameterTypes().length == 1
@@ -136,7 +137,9 @@
             
             Object mObj = obj;
             
-            Class<?> objectFactory = Class.forName(PackageUtils.getPackageName(typeClass)
+ ".ObjectFactory");
+            Class<?> objectFactory = Class.forName(PackageUtils.getPackageName(typeClass)
+ ".ObjectFactory",
+                                                   true,
+                                                   obj.getClass().getClassLoader());
             Method methods[] = objectFactory.getDeclaredMethods();
             for (Method method : methods) {
                 if (method.getParameterTypes().length == 1

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/i18n/BundleUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/i18n/BundleUtils.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/i18n/BundleUtils.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/i18n/BundleUtils.java
Mon Sep 24 13:15:55 2007
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.common.i18n;
 
+import java.util.Locale;
+import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
 import org.apache.cxf.common.util.PackageUtils;
@@ -72,7 +74,17 @@
      * @return an appropriate ResourceBundle
      */
     public static ResourceBundle getBundle(Class<?> cls) {
-        return ResourceBundle.getBundle(getBundleName(cls));
+        
+        try {
+            return ResourceBundle.getBundle(getBundleName(cls),
+                                        Locale.getDefault(),
+                                        cls.getClassLoader());
+        } catch (MissingResourceException ex) {
+            return ResourceBundle.getBundle(getBundleName(cls),
+                                            Locale.getDefault(),
+                                            Thread.currentThread().getContextClassLoader());
+            
+        }
     }
     
     /**
@@ -84,6 +96,15 @@
      * @return an appropriate ResourceBundle
      */
     public static ResourceBundle getBundle(Class<?> cls, String name) {
-        return ResourceBundle.getBundle(getBundleName(cls, name));
+        try {
+            return ResourceBundle.getBundle(getBundleName(cls, name),
+                                            Locale.getDefault(),
+                                            cls.getClassLoader());
+        } catch (MissingResourceException ex) {
+            return ResourceBundle.getBundle(getBundleName(cls, name),
+                                            Locale.getDefault(),
+                                            Thread.currentThread().getContextClassLoader());
+            
+        }
     }
 }

Modified: incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
(original)
+++ incubator/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Mon Sep 24 13:15:55 2007
@@ -20,11 +20,18 @@
 package org.apache.cxf.maven_plugin;
 
 import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.tools.wsdlto.WSDLToJava;
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
@@ -33,7 +40,8 @@
 /**
  * @goal wsdl2java
  * @description CXF WSDL To Java Tool
- */
+ * @requiresDependencyResolution test
+*/
 public class WSDL2JavaMojo extends AbstractMojo {
     /**
      * @parameter
@@ -53,12 +61,6 @@
     String classesDirectory;
 
     /**
-     * @parameter  expression="${project.compileClasspathElements}"
-     * @required
-     */
-    List classpathElements;
-
-    /**
      * @parameter expression="${project}"
      * @required
      */
@@ -83,19 +85,44 @@
             throw new MojoExecutionException("Must specify wsdlOptions");
         }
 
+        List<URL> urlList = new ArrayList<URL>();
         StringBuffer buf = new StringBuffer();
-        Iterator it = classpathElements.iterator();
-        while (it.hasNext()) {
-            buf.append(it.next().toString());
-            buf.append(File.pathSeparatorChar);
+
+        try {
+            urlList.add(classesDir.toURL());
+        } catch (MalformedURLException e) {
+            //ignore
         }
+
+        buf.append(classesDir.getAbsolutePath());
+        buf.append(File.pathSeparatorChar);
+
+        for (Artifact a : CastUtils.cast(project.getTestArtifacts(), Artifact.class)) {
+            try {
+                if (a.getFile() != null
+                    && a.getFile().exists()) {
+                    urlList.add(a.getFile().toURL());
+                    buf.append(a.getFile().getAbsolutePath());
+                    buf.append(File.pathSeparatorChar);
+                    //System.out.println("     " + a.getFile().getAbsolutePath());
+                }
+            } catch (MalformedURLException e) {
+                //ignore
+            }
+        }
+        
+        ClassLoader origContext = Thread.currentThread().getContextClassLoader();
+        URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
+                                                   origContext);
         String newCp = buf.toString();
 
         String cp = System.getProperty("java.class.path");
         SecurityManager oldSm = System.getSecurityManager();
         long timestamp = CodegenUtils.getCodegenTimestamp();
         boolean result = true;
+        
         try {
+            Thread.currentThread().setContextClassLoader(loader);
             System.setProperty("java.class.path", newCp);
             System.setSecurityManager(new NoExitSecurityManager());
             for (int x = 0; x < wsdlOptions.length; x++) {
@@ -109,6 +136,12 @@
                 }
             }
         } finally {
+            //cleanup as much as we can.
+            Bus bus = BusFactory.getDefaultBus(false);
+            if (bus != null) {
+                bus.shutdown(true);
+            }
+            Thread.currentThread().setContextClassLoader(origContext);
             System.setSecurityManager(oldSm);
             System.setProperty("java.class.path", cp);
         }
@@ -150,6 +183,7 @@
 
 
         if (doWork) {
+            doneFile.delete();
 
             List<String> list = new ArrayList<String>();
             if (wsdlOption.getPackagenames() != null) {
@@ -184,11 +218,9 @@
                     }
                     System.setProperty("exitOnFinish", "YES");
                     WSDLToJava.main((String[])list.toArray(new String[list.size()]));
-                    doneFile.delete();
                     doneFile.createNewFile();
                 } catch (ExitException e) {
                     if (e.getStatus() == 0) {
-                        doneFile.delete();
                         doneFile.createNewFile();
                     } else {
                         throw e;

Propchange: incubator/cxf/trunk/maven-plugins/java2ws-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Sep 24 13:15:55 2007
@@ -0,0 +1,10 @@
+.pmd
+.checkstyle
+.ruleset
+target
+.settings
+.classpath
+.project
+.wtpmodules
+
+

Modified: incubator/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml (original)
+++ incubator/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml Mon Sep 24 13:15:55 2007
@@ -23,7 +23,7 @@
     <artifactId>cxf-java2ws-plugin</artifactId>
     <packaging>maven-plugin</packaging>
     <version>2.1-incubator-SNAPSHOT</version>
-    <name>Apache CXF Code Generation Maven2 Plugins</name>
+    <name>Apache CXF Java2WS Maven2 Plugin</name>
     <url>http://cwiki.apache.org/CXF</url>
 
 
@@ -107,9 +107,9 @@
     </repositories>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/maven-plugins/codegen-plugin</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/maven-plugins/codegen-plugin</developerConnection>
-      <url>http://svn.apache.org/viewvc/incubator/cxf/trunk/cxf-parent/cxf-codegen-plugin</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/maven-plugins/java2ws-plugin</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/maven-plugins/java2ws-plugin</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/cxf/trunk/cxf-parent/cxf-java2ws-plugin</url>
   </scm>
 
 </project>

Modified: incubator/cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Mon Sep 24 13:15:55 2007
@@ -50,7 +50,7 @@
         <jetty.version>6.1.5</jetty.version>
         <saaj.version>1.3</saaj.version>
         <saaj.impl.version>1.3</saaj.impl.version>
-        <spring.version>2.0.4</spring.version>
+        <spring.version>2.0.6</spring.version>
         <wsdl4j.version>1.6.1</wsdl4j.version>
         <derby.version>10.2.2.0</derby.version>
         <activemq.version>4.1.1</activemq.version>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
Mon Sep 24 13:15:55 2007
@@ -186,8 +186,8 @@
                 if (LOG.isLoggable(Level.FINE)) {
                     LOG.fine("Registering extension: " + elementType + " for parent: " +
parentType);
                 }
-                JAXBExtensionHelper.addExtensions(registry, parentType, elementType, getClass()
-                                .getClassLoader());
+                JAXBExtensionHelper.addExtensions(registry, parentType, elementType, 
+                                                  Thread.currentThread().getContextClassLoader());
             } catch (ClassNotFoundException ex) {
                 LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
             } catch (JAXBException ex) {

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Mon
Sep 24 13:15:55 2007
@@ -206,8 +206,9 @@
     private void registerInitialExtensions() throws BusException {
         Properties initialExtensions = null;
         try {
-            initialExtensions = PropertiesLoaderUtils.loadAllProperties(EXTENSIONS_RESOURCE,
Thread
-                            .currentThread().getContextClassLoader());
+            initialExtensions = PropertiesLoaderUtils.loadAllProperties(EXTENSIONS_RESOURCE,

+                                                                        Thread.currentThread()
+                                                                              .getContextClassLoader());
         } catch (IOException ex) {
             throw new BusException(ex);
         }
@@ -220,8 +221,9 @@
                 if (LOG.isLoggable(Level.FINE)) {
                     LOG.fine("Registering extension: " + elementType + " for parent: " +
parentType);
                 }
-                JAXBExtensionHelper.addExtensions(registry, parentType, elementType, getClass()
-                                .getClassLoader());
+                JAXBExtensionHelper.addExtensions(registry, parentType, elementType, 
+                                                  Thread.currentThread()
+                                                      .getContextClassLoader());
             } catch (ClassNotFoundException ex) {
                 LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
             } catch (JAXBException ex) {

Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Mon Sep 24 13:15:55 2007
@@ -41,15 +41,6 @@
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-codegen-plugin</artifactId>
                 <version>${project.version}</version>
-                <!-- this dependency seems only work in the systest module, not work in
the top level-->
-                <dependencies>
-                  <dependency>
-                    <groupId>org.apache.cxf</groupId>
-                    <artifactId>cxf-rt-bindings-soap</artifactId>
-                    <version>${project.version}</version>
-                  </dependency>
-                </dependencies>
-
                 <executions>
                     <execution>
                         <id>generate-test-sources</id>
@@ -59,11 +50,11 @@
                             <wsdlOptions>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/test/resources/wsdl/pizza_service.wsdl</wsdl>
-                                    <!--extraargs>
+                                    <extraargs>
                                       <extraarg>-exsh</extraarg>
                                       <extraarg>true</extraarg>
                                       <extraarg>-V</extraarg>
-                                    </extraargs-->
+                                    </extraargs>
                                 </wsdlOption>
 
                                 <wsdlOption>

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
Mon Sep 24 13:15:55 2007
@@ -59,12 +59,11 @@
         header.setName("mao");
         header.setPhoneNumber("108");
 
-        OrderPizzaResponseType res = port.orderPizza(req);
-        System.out.println(res);
+        //OrderPizzaResponseType res = port.orderPizza(req);
+        OrderPizzaResponseType res =  port.orderPizza(req, header);
+        //System.out.println(res);
 
-        //OrderPizzaResponseType res =  port.orderPizza(req, header);
-
-        //assertEquals(208, res.getMinutesUntilReady());
+        assertEquals(208, res.getMinutesUntilReady());
     }
 
     private Pizza getPort() {

Modified: incubator/cxf/trunk/tools/javato/ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/pom.xml?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/pom.xml (original)
+++ incubator/cxf/trunk/tools/javato/ws/pom.xml Mon Sep 24 13:15:55 2007
@@ -38,46 +38,46 @@
             <artifactId>cxf-tools-common</artifactId>
             <version>${project.version}</version>
         </dependency>
-        
-        
+
+
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-api</artifactId>
             <version>${project.version}</version>
-        </dependency>        
-        
+        </dependency>
+
         <dependency>
-             <groupId>org.apache.cxf</groupId>
-             <artifactId>cxf-rt-frontend-simple</artifactId>
-             <version>${project.version}</version>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+            <version>${project.version}</version>
         </dependency>
- 
-        
+
+
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-tools-wsdlto-core</artifactId>
             <version>${project.version}</version>
         </dependency>
- 
- 
- 
-         <dependency>
-             <groupId>org.apache.cxf</groupId>
-             <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
-             <version>${project.version}</version>
-         </dependency>
- 
-         <dependency>
-             <groupId>org.apache.cxf</groupId>
-             <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
-             <version>${project.version}</version>
+
+
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
+            <version>${project.version}</version>
         </dependency>
-        
-         <dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>javax.xml.bind</groupId>
             <artifactId>jaxb-api</artifactId>
-        </dependency>       
+        </dependency>
 
 
         <dependency>
@@ -123,20 +123,26 @@
             <artifactId>cxf-rt-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        
-         <dependency>
-	   <groupId>org.apache.cxf</groupId>
-           <artifactId>cxf-rt-databinding-aegis</artifactId>
-           <version>${project.version}</version>
-	</dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-databinding-aegis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
-        </dependency>      
-        
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.cxf</groupId>
+                    <artifactId>cxf-rt-bindings-xml</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
         <dependency>
             <groupId>com.sun.xml.bind</groupId>
             <artifactId>jaxb-xjc</artifactId>
@@ -150,14 +156,14 @@
             <groupId>javax.xml.ws</groupId>
             <artifactId>jaxws-api</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-testutils</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
-        </dependency>        
-        
+        </dependency>
+
 
     </dependencies>
     <build>
@@ -172,6 +178,7 @@
                         <phase>generate-test-sources</phase>
                         <configuration>
                             <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+
                             <wsdlOptions>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/test/resources/java2wsdl_wsdl/hello_world_async.wsdl</wsdl>
@@ -193,6 +200,9 @@
                                 </wsdlOption>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/test/resources/java2wsdl_wsdl/hello_world_bare.wsdl</wsdl>
+                                    <extraargs>
+                                        <arg>-verbose</arg>
+                                    </extraargs>
                                 </wsdlOption>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/test/resources/java2wsdl_wsdl/hello_world_fault.wsdl</wsdl>
@@ -228,9 +238,9 @@
         </plugins>
     </build>
     <scm>
-	<connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/tools/javato/core</connection>
-	<developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/tools/javato/ws</developerConnection>
-	<url>http://svn.apache.org/viewvc/incubator/cxf/trunk/cxf-parent/cxf-tools-java2wsdl</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/tools/javato/core</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/tools/javato/ws</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/cxf/trunk/cxf-parent/cxf-tools-java2wsdl</url>
     </scm>
 
 </project>

Modified: incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
(original)
+++ incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
Mon Sep 24 13:15:55 2007
@@ -287,7 +287,7 @@
 
     public Class<?> getServiceClass() {
         return AnnotationUtil.loadClass((String)context.get(ToolConstants.CFG_CLASSNAME),
-                                        getClass().getClassLoader());
+                                        Thread.currentThread().getContextClassLoader());
     }
 
     public WSDLConstants.WSDLVersion getWSDLVersion() {

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/resources/java2wsdl_wsdl/hello_world_bare.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/resources/java2wsdl_wsdl/hello_world_bare.wsdl?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/resources/java2wsdl_wsdl/hello_world_bare.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/resources/java2wsdl_wsdl/hello_world_bare.wsdl
Mon Sep 24 13:15:55 2007
@@ -17,117 +17,117 @@
 specific language governing permissions and limitations
 under the License.
 -->
-<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/xml_bare" 
-		  xmlns="http://schemas.xmlsoap.org/wsdl/"
-		  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
-		  xmlns:xformat="http://cxf.apache.org/bindings/xformat" 
-		  xmlns:tns="http://apache.org/xml_bare"
-		  xmlns:x1="http://apache.org/xml_bare/types"
-		  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
-		  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-    
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/xml_bare"
+          xmlns="http://schemas.xmlsoap.org/wsdl/"
+          xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+          xmlns:xformat="http://cxf.apache.org/bindings/xformat"
+          xmlns:tns="http://apache.org/xml_bare"
+          xmlns:x1="http://apache.org/xml_bare/types"
+          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
     <wsdl:types>
-	<schema targetNamespace="http://apache.org/xml_bare/types" 
-		xmlns="http://www.w3.org/2001/XMLSchema" 
-		elementFormDefault="qualified">
-
-	    <element name="responseType" type="xsd:string"/>
-	    <element name="requestType" type="xsd:string"/>      
-	    <element name="myComplexStruct" type="x1:myComplexStructType"/>     
-	    
-	    <complexType name="myComplexStructType">
-		<sequence>
-		    <element name="elem1" type="xsd:string"/>
-		    <element name="elem2" type="xsd:string"/>
-		    <element name="elem3" type="xsd:int"/>
-		</sequence>
-	    </complexType>
-	</schema>
+        <schema targetNamespace="http://apache.org/xml_bare/types"
+            xmlns="http://www.w3.org/2001/XMLSchema"
+            elementFormDefault="qualified">
+
+            <element name="responseType" type="xsd:string"/>
+            <element name="requestType" type="xsd:string"/>
+            <element name="myComplexStruct" type="x1:myComplexStructType"/>
+
+            <complexType name="myComplexStructType">
+                <sequence>
+                    <element name="elem1" type="xsd:string"/>
+                    <element name="elem2" type="xsd:string"/>
+                    <element name="elem3" type="xsd:int"/>
+                </sequence>
+            </complexType>
+        </schema>
     </wsdl:types>
-    
+
     <wsdl:message name="sayHiRequest"/>
-    
+
     <wsdl:message name="sayHiResponse">
-	<wsdl:part type="xsd:string" name="out"/>
+        <wsdl:part type="xsd:string" name="out"/>
     </wsdl:message>
-    
+
     <wsdl:message name="greetMeRequest">
-	<wsdl:part element="x1:requestType" name="me"/>
+        <wsdl:part element="x1:requestType" name="me"/>
     </wsdl:message>
-    
+
     <wsdl:message name="greetMeResponse">
-	<wsdl:part element="x1:responseType" name="theResponse"/>
+        <wsdl:part element="x1:responseType" name="theResponse"/>
     </wsdl:message>
-    
+
     <wsdl:message name="sendReceiveDataRequest">
-	<wsdl:part type="x1:myComplexStructType" name="in"/>
+        <wsdl:part type="x1:myComplexStructType" name="in"/>
     </wsdl:message>
-    
+
     <wsdl:message name="sendReceiveDataResponse">
-	<wsdl:part type="x1:myComplexStructType" name="out"/>
+        <wsdl:part type="x1:myComplexStructType" name="out"/>
     </wsdl:message>
 
     <wsdl:message name="multiParamPartRequest">
-	<wsdl:part element="x1:requestType" name="in1"/>
-	<wsdl:part element="x1:myComplexStruct" name="in2"/>
+        <wsdl:part element="x1:requestType" name="in1"/>
+        <wsdl:part element="x1:myComplexStruct" name="in2"/>
     </wsdl:message>
-    
+
     <wsdl:message name="multiParamPartResponse">
-	<wsdl:part element="x1:responseType" name="out1"/>
+        <wsdl:part element="x1:responseType" name="out1"/>
     </wsdl:message>
 
     <wsdl:portType name="Greeter">
-	<wsdl:operation name="sayHi">
-	    <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
-	    <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
-	</wsdl:operation>
-	<wsdl:operation name="greetMe">
-	    <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
-	    <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
-	</wsdl:operation>
-	<wsdl:operation name="sendReceiveData">
-	    <wsdl:input message="tns:sendReceiveDataRequest" name="SendReceiveDataRequest"/>
-	    <wsdl:output message="tns:sendReceiveDataResponse" name="SendReceiveDataResponse"/>
-	</wsdl:operation>
-	<wsdl:operation name="testMultiParamPart" parameterOrder="in2 in1">
-	    <wsdl:input message="tns:multiParamPartRequest" name="multiParamPartRequest"/>
-	    <wsdl:output message="tns:multiParamPartResponse" name="multiParamPartResponse"/>
-	</wsdl:operation>
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="sendReceiveData">
+            <wsdl:input message="tns:sendReceiveDataRequest" name="SendReceiveDataRequest"/>
+            <wsdl:output message="tns:sendReceiveDataResponse" name="SendReceiveDataResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="testMultiParamPart" parameterOrder="in2 in1">
+            <wsdl:input message="tns:multiParamPartRequest" name="multiParamPartRequest"/>
+            <wsdl:output message="tns:multiParamPartResponse" name="multiParamPartResponse"/>
+        </wsdl:operation>
     </wsdl:portType>
-    
+
     <wsdl:binding name="Greeter_XMLBinding" type="tns:Greeter">
 
-	<xformat:binding/>
+        <xformat:binding/>
 
-	<wsdl:operation name="sayHi">
-	    <wsdl:input>
-		<xformat:body rootNode="tns:sayHi"/>
-	    </wsdl:input>
-	    <wsdl:output/>
-	</wsdl:operation>
-	
-	<wsdl:operation name="greetMe">
-	    <wsdl:input/>
-	    <wsdl:output/>
-	</wsdl:operation>
-	
-	<wsdl:operation name="sendReceiveData">
-	    <wsdl:input/>
-	    <wsdl:output/>
-	</wsdl:operation>
-
-	<wsdl:operation name="testMultiParamPart">
-	    <wsdl:input>
-		<xformat:body rootNode="tns:multiParamRootReq"/>
-	    </wsdl:input>
-	    <wsdl:output/>
-	</wsdl:operation>
+        <wsdl:operation name="sayHi">
+            <wsdl:input>
+                <xformat:body rootNode="tns:sayHi"/>
+            </wsdl:input>
+            <wsdl:output/>
+        </wsdl:operation>
+
+        <wsdl:operation name="greetMe">
+            <wsdl:input/>
+            <wsdl:output/>
+        </wsdl:operation>
+
+        <wsdl:operation name="sendReceiveData">
+            <wsdl:input/>
+            <wsdl:output/>
+        </wsdl:operation>
+
+        <wsdl:operation name="testMultiParamPart">
+            <wsdl:input>
+                <xformat:body rootNode="tns:testMultiParamPart"/>
+            </wsdl:input>
+            <wsdl:output/>
+        </wsdl:operation>
 
     </wsdl:binding>
-    
+
     <wsdl:service name="XMLService">
-	<wsdl:port binding="tns:Greeter_XMLBinding" name="XMLPort">
-	    <http:address location="http://localhost:9000/XMLService/XMLPort"/>
-	</wsdl:port>
+        <wsdl:port binding="tns:Greeter_XMLBinding" name="XMLPort">
+            <http:address location="http://localhost:9000/XMLService/XMLPort"/>
+        </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=578944&r1=578943&r2=578944&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Mon Sep 24 13:15:55 2007
@@ -564,7 +564,11 @@
                 if (LOG.isLoggable(Level.FINE)) {
                     LOG.fine("Found service validator : " + validatorClass);
                 }
-                ServiceValidator validator = (ServiceValidator)Class.forName(validatorClass).newInstance();
+                ServiceValidator validator = 
+                    (ServiceValidator)Class.forName(validatorClass,
+                                                    true,
+                                                    Thread.currentThread()
+                                                        .getContextClassLoader()).newInstance();
                 validators.add(validator);
             } catch (Exception ex) {
                 LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);



Mime
View raw message