cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r534954 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/wsdl/ rt/core/src/main/java/org/apache/cxf/transport/http/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/core/src/test/java/org/apache/cxf/wsdl11/ rt/databinding/aegis/sr...
Date Thu, 03 May 2007 18:31:47 GMT
Author: dkulp
Date: Thu May  3 11:31:45 2007
New Revision: 534954

URL: http://svn.apache.org/viewvc?view=rev&rev=534954
Log:
First part of fix for CXF-631 - it still won't produce a valid wsdl, but it doesn't throw
an exception

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/TExtensibilityElementImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/TExtensibilityElementImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/TExtensibilityElementImpl.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/TExtensibilityElementImpl.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/TExtensibilityElementImpl.java
Thu May  3 11:31:45 2007
@@ -56,7 +56,7 @@
      * @return Boolean
      */
     public Boolean getRequired() {
-        return isRequired();
+        return isSetRequired() ? isRequired() : null;
     }
     public void setRequired(Boolean value) {
         this.required = value;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Thu May  3 11:31:45 2007
@@ -37,7 +37,6 @@
 import javax.wsdl.extensions.schema.Schema;
 import javax.wsdl.extensions.schema.SchemaImport;
 import javax.wsdl.extensions.schema.SchemaReference;
-import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLWriter;
 import javax.xml.parsers.ParserConfigurationException;
 
@@ -56,6 +55,7 @@
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transports.http.QueryHandler;
+import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.cxf.wsdl11.ResourceManagerWSDLLocator;
 import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
 
@@ -125,7 +125,7 @@
             }
             
             if (!mp.containsKey(wsdl)) {
-                Definition def = new ServiceWSDLBuilder(endpointInfo.getService()).build();
+                Definition def = new ServiceWSDLBuilder(bus, endpointInfo.getService()).build();
                 mp.put("", def);
                 updateDefinition(def, mp, smp, base, endpointInfo);
             }
@@ -135,7 +135,9 @@
             if (xsd == null) {
                 Definition def = mp.get(wsdl);
     
-                WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
+                WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
+                    .getWSDLFactory().newWSDLWriter();
+                def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtenstionRegistry());
                 doc = wsdlWriter.getDocument(def);
             } else {
                 SchemaReference si = smp.get(xsd);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
Thu May  3 11:31:45 2007
@@ -45,7 +45,6 @@
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ElementExtensible;
 import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.factory.WSDLFactory;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.ParserConfigurationException;
 
@@ -54,6 +53,7 @@
 
 import com.ibm.wsdl.extensions.schema.SchemaImpl;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.service.model.AbstractMessageContainer;
@@ -70,6 +70,7 @@
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.wsdl.WSDLConstants;
+import org.apache.cxf.wsdl.WSDLManager;
 
 public final class ServiceWSDLBuilder {
     
@@ -79,13 +80,15 @@
     private boolean useSchemaImports;
     private String baseFileName;
     private int xsdCount;
+    private Bus bus;
     
-    public ServiceWSDLBuilder(List<ServiceInfo> services) {
+    public ServiceWSDLBuilder(Bus b, List<ServiceInfo> services) {
         this.services = services;
+        bus = b;
         ns2prefix = new HashMap<String, String>();
     }
-    public ServiceWSDLBuilder(ServiceInfo ... services) {
-        this(Arrays.asList(services));
+    public ServiceWSDLBuilder(Bus b, ServiceInfo ... services) {
+        this(b, Arrays.asList(services));
     }
     public void setUseSchemaImports(boolean b) {
         useSchemaImports = b;
@@ -105,10 +108,8 @@
             //ignore
         }
         if (definition == null) {
-            definition = WSDLFactory.newInstance().newDefinition();
-            definition.getExtensionRegistry().registerSerializer(Types.class, 
-                                                                 WSDLConstants.SCHEMA_QNAME,
-                                                                 new SchemaSerializer());
+            definition = bus.getExtension(WSDLManager.class).getWSDLFactory().newDefinition();
+            definition.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtenstionRegistry());
                     
             addNamespace(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NU_SCHEMA_XSD);
             
@@ -137,6 +138,8 @@
         List<ExtensibilityElement> extensibilityElements) {
         if (extensibilityElements != null) {
             for (ExtensibilityElement element : extensibilityElements) {
+                QName qn = element.getElementType();
+                addNamespace(qn.getNamespaceURI());
                 elementExtensible.addExtensibilityElement(element);
             }
         }

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?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- 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 Thu
May  3 11:31:45 2007
@@ -33,6 +33,7 @@
 import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 import javax.wsdl.Definition;
+import javax.wsdl.Types;
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ExtensionRegistry;
 import javax.wsdl.factory.WSDLFactory;
@@ -48,6 +49,7 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PropertiesLoaderUtils;
 import org.apache.cxf.wsdl.JAXBExtensionHelper;
+import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.cxf.wsdl.WSDLManager;
 
 /**
@@ -70,6 +72,9 @@
         try {
             factory = WSDLFactory.newInstance();
             registry = factory.newPopulatedExtensionRegistry();
+            registry.registerSerializer(Types.class, 
+                                        WSDLConstants.SCHEMA_QNAME,
+                                        new SchemaSerializer());
         } catch (WSDLException e) {
             throw new BusException(e);
         }

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
(original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
Thu May  3 11:31:45 2007
@@ -46,6 +46,7 @@
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
@@ -95,6 +96,7 @@
                 break;
             }
         }
+        EasyMock.expect(bus.getExtension(WSDLManager.class)).andReturn(new WSDLManagerImpl()).anyTimes();
         
         EasyMock.expect(bus.getExtension(BindingFactoryManager.class)).andReturn(bindingFactoryManager);
         EasyMock.expect(bus.getExtension(DestinationFactoryManager.class))
@@ -109,7 +111,7 @@
         serviceInfo = wsdlServiceBuilder.buildServices(def, service).get(0);
         serviceInfo.setProperty(WSDLServiceBuilder.WSDL_DEFINITION, null);
         serviceInfo.setProperty(WSDLServiceBuilder.WSDL_SERVICE, null);
-        newDef = new ServiceWSDLBuilder(serviceInfo).build();
+        newDef = new ServiceWSDLBuilder(bus, serviceInfo).build();
         
     }
     

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
Thu May  3 11:31:45 2007
@@ -135,7 +135,7 @@
         for (Server s : svrMan.getServers()) {
             Service svc = s.getEndpoint().getService();
             if (svc.getName().getLocalPart().equals(string)) {
-                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(svc.getServiceInfos());
+                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                 Definition definition = builder.build();
                 
                 WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
Thu May  3 11:31:45 2007
@@ -121,7 +121,7 @@
         assertEquals(1, bindings.size());
         
         ServiceWSDLBuilder wsdlBuilder = 
-            new ServiceWSDLBuilder(service.getServiceInfos().get(0));
+            new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0));
         return wsdlBuilder.build();
     }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
Thu May  3 11:31:45 2007
@@ -62,7 +62,7 @@
         assertEquals(1, bindings.size());
         
         ServiceWSDLBuilder wsdlBuilder = 
-            new ServiceWSDLBuilder(service.getServiceInfos().get(0));
+            new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0));
         return wsdlBuilder.build();
     }
 

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
Thu May  3 11:31:45 2007
@@ -30,6 +30,7 @@
 import javax.annotation.Resource;
 import javax.wsdl.Port;
 import javax.wsdl.extensions.http.HTTPAddress;
+import javax.wsdl.extensions.soap.SOAPAddress;
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.Bus;
@@ -203,8 +204,7 @@
         }
         HttpEndpointInfo hei = new HttpEndpointInfo(serviceInfo, 
             "http://schemas.xmlsoap.org/wsdl/http/");
-        AddressType at = new AddressType();
-        at.setElementType(new QName("http://schemas.xmlsoap.org/wsdl/http/", "address"));
+        AddressType at = new HttpAddressType();
         hei.addExtensor(at);
         
         return hei;
@@ -265,5 +265,22 @@
             }
         }
     }    
+    
+    private static class HttpAddressType extends AddressType 
+        implements HTTPAddress, SOAPAddress {
+        public HttpAddressType() {
+            super();
+            setElementType(new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address"));
+        }
+        
+        public String getLocationURI() {
+            return getLocation();
+        }
+
+        public void setLocationURI(String locationURI) {
+            setLocation(locationURI);
+        }
+        
+    }
 
 }

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/AbstractGenerator.java
Thu May  3 11:31:45 2007
@@ -20,12 +20,16 @@
 package org.apache.cxf.tools.java2wsdl.generator;
 
 import java.io.File;
+
+import org.apache.cxf.Bus;
 import org.apache.cxf.service.model.ServiceInfo;
 
 public abstract class AbstractGenerator<T> {
     private ServiceInfo service;
     private boolean allowImports;
     private File outputdir;
+    private Bus bus;
+    
 
     public void setOutputBase(File out) {
         this.outputdir = out;
@@ -41,6 +45,13 @@
 
     public ServiceInfo getServiceModel() {
         return this.service;
+    }
+    
+    public Bus getBus() {
+        return bus;
+    }
+    public void setBus(Bus b) {
+        bus = b;
     }
     
     public void setAllowImports(boolean b) {

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
Thu May  3 11:31:45 2007
@@ -23,18 +23,11 @@
 import org.apache.cxf.tools.common.WSDLConstants;
 
 public final class WSDLGeneratorFactory {
-    private static WSDLGeneratorFactory instance;
     private WSDLConstants.WSDLVersion wsdlVersion;
     
-    private WSDLGeneratorFactory() {
+    public  WSDLGeneratorFactory() {
     }
 
-    public static WSDLGeneratorFactory getInstance() {
-        if (instance == null) {
-            instance = new WSDLGeneratorFactory();
-        }
-        return instance;
-    }
 
     public void setWSDLVersion(WSDLConstants.WSDLVersion v) {
         this.wsdlVersion = v;

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java
Thu May  3 11:31:45 2007
@@ -34,7 +34,7 @@
 import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
 
 public class WSDL11Generator extends AbstractGenerator<Definition> {
-
+    
     public Definition generate(final File dir) {
         File file = getOutputBase();
         if (file == null && dir != null) {
@@ -52,7 +52,7 @@
         try {
             OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
             WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
-            ServiceWSDLBuilder builder = new ServiceWSDLBuilder(getServiceModel());
+            ServiceWSDLBuilder builder = new ServiceWSDLBuilder(getBus(), getServiceModel());
             builder.setUseSchemaImports(this.allowImports());
             
             String name = file.getName();

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
Thu May  3 11:31:45 2007
@@ -96,7 +96,7 @@
     }
 
     private AbstractGenerator getWSDLGenerator(final File wsdlFile) {
-        WSDLGeneratorFactory factory = WSDLGeneratorFactory.getInstance();
+        WSDLGeneratorFactory factory = new WSDLGeneratorFactory();
         factory.setWSDLVersion(getWSDLVersion());
 
         AbstractGenerator generator = factory.newGenerator();
@@ -108,6 +108,7 @@
     public void generate(ServiceInfo service, File output) throws ToolException {
         for (AbstractGenerator generator : generators) {
             generator.setServiceModel(service);
+            generator.setBus(getBus());
             generator.generate(output);
         }
     }

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java
Thu May  3 11:31:45 2007
@@ -24,9 +24,9 @@
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WSDL11Generator;
 
 public class WSDLGeneratorFactoryTest extends TestCase {
-    WSDLGeneratorFactory factory = WSDLGeneratorFactory.getInstance();
 
     public void testNewWSDL11Generator() {
+        WSDLGeneratorFactory factory = new WSDLGeneratorFactory();
         factory.setWSDLVersion(WSDLConstants.WSDLVersion.WSDL11);
         AbstractGenerator generator = factory.newGenerator();
         assertNotNull(generator);

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
Thu May  3 11:31:45 2007
@@ -37,6 +37,7 @@
     public void setUp() throws Exception {
         super.setUp();
         builder.setBus(BusFactory.getDefaultBus());
+        generator.setBus(builder.getBus());
     }
 
     public void tearDown() {

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
Thu May  3 11:31:45 2007
@@ -36,6 +36,7 @@
     public void setUp() throws Exception {
         super.setUp();
         builder.setBus(BusFactory.getDefaultBus());
+        generator.setBus(builder.getBus());
     }
 
     @org.junit.After

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?view=diff&rev=534954&r1=534953&r2=534954
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
Thu May  3 11:31:45 2007
@@ -43,6 +43,7 @@
     public void setUp() throws Exception {
         super.setUp();
         builder.setBus(BusFactory.getDefaultBus());
+        generator.setBus(builder.getBus());
     }
 
     @org.junit.After



Mime
View raw message