cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r545465 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/simple/src/main/java/org/apache/cxf/simple/ tools/javato/ tools/javato/src/main/java/org/apache/c...
Date Fri, 08 Jun 2007 09:47:27 GMT
Author: mmao
Date: Fri Jun  8 02:47:24 2007
New Revision: 545465

URL: http://svn.apache.org/viewvc?view=rev&rev=545465
Log:
* Java2Wsdl should not depends on specific frontend, 
   it should treat frontend like a plugin, 
   however the unit tests still depend on them.
* Move the frontend specific service builder to their own frontend module


Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/ServiceBuilder.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java
      - copied, changed from r545422, incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilder.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/simple/
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/simple/SimpleServiceBuilder.java
      - copied, changed from r545422, incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/SimpleServiceBuilder.java
Removed:
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilder.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilder.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/SimpleServiceBuilder.java
Modified:
    incubator/cxf/trunk/tools/javato/pom.xml
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGeneratorTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WrapperBeanGeneratorTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.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
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapperTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapperTest.java

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/ServiceBuilder.java?view=auto&rev=545465
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/ServiceBuilder.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/ServiceBuilder.java Fri Jun
 8 02:47:24 2007
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.service;
+
+import java.io.File;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.service.model.ServiceInfo;
+
+public interface ServiceBuilder {
+    ServiceInfo createService();
+
+    void setBindingId(String id);
+    void setTransportId(String id);
+    void setBus(Bus bus);
+    void setAddress(String addr);
+    void setServiceClass(Class clz);
+
+    File getOutputFile();
+}

Copied: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java
(from r545422, incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilder.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java?view=diff&rev=545465&p1=incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilder.java&r1=545422&p2=incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilder.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxwsServiceBuilder.java
Fri Jun  8 02:47:24 2007
@@ -17,21 +17,22 @@
  * under the License.
  */
 
-package org.apache.cxf.tools.java2wsdl.processor.internal.jaxws;
+package org.apache.cxf.jaxws;
 
 import java.io.File;
-import javax.jws.WebService;
 
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.frontend.AbstractServiceFactory;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilder;
-import org.apache.cxf.tools.util.AnnotationUtil;
 
-public class JaxwsServiceBuilder extends ServiceBuilder {
+public class JaxwsServiceBuilder extends AbstractServiceFactory {
+
+    final JaxWsServiceFactoryBean serviceFactory;
     
     public JaxwsServiceBuilder() {
         super();
-        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
+        serviceFactory = new JaxWsServiceFactoryBean();
         //As this is a javatowsdl tool, explictly populate service model from class
         serviceFactory.setPopulateFromClass(true);
         
@@ -39,11 +40,8 @@
     }
 
     public File getOutputFile() {
-        WebService webService = AnnotationUtil.getPrivClassAnnotation(getServiceClass(),
WebService.class);
-        if (webService == null) {
-            return null;
-        }
-        String wsdlLocation = webService.wsdlLocation();
+        JaxWsImplementorInfo jaxwsImpl = serviceFactory.getJaxWsImplementorInfo();
+        String wsdlLocation = jaxwsImpl.getWsdlLocation();
         if (!StringUtils.isEmpty(wsdlLocation)) {
             return new File(wsdlLocation);
         }

Copied: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/simple/SimpleServiceBuilder.java
(from r545422, incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/SimpleServiceBuilder.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/simple/SimpleServiceBuilder.java?view=diff&rev=545465&p1=incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/SimpleServiceBuilder.java&r1=545422&p2=incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/simple/SimpleServiceBuilder.java&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/SimpleServiceBuilder.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/simple/SimpleServiceBuilder.java
Fri Jun  8 02:47:24 2007
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.apache.cxf.tools.java2wsdl.processor.internal.simple;
+package org.apache.cxf.simple;
 
+import org.apache.cxf.frontend.AbstractServiceFactory;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
-import org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilder;
 
-public class SimpleServiceBuilder extends ServiceBuilder {
+public class SimpleServiceBuilder extends AbstractServiceFactory {
     
     public SimpleServiceBuilder() {
         super();

Modified: incubator/cxf/trunk/tools/javato/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/pom.xml?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/pom.xml (original)
+++ incubator/cxf/trunk/tools/javato/pom.xml Fri Jun  8 02:47:24 2007
@@ -80,14 +80,15 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
             <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.cxf</groupId>
-                    <artifactId>cxf-tools-common</artifactId>
-                </exclusion>
-            </exclusions>
+	    <scope>test</scope>
         </dependency>
 
         <dependency>
@@ -113,7 +114,10 @@
             <artifactId>jaxb-impl</artifactId>
         </dependency>
 
-
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+        </dependency>
 
     </dependencies>
 

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=545465&r1=545464&r2=545465
==============================================================================
--- 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
Fri Jun  8 02:47:24 2007
@@ -32,6 +32,7 @@
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.service.ServiceBuilder;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.Processor;
@@ -42,7 +43,6 @@
 import org.apache.cxf.tools.java2wsdl.generator.WSDLGeneratorFactory;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.FaultBeanGenerator;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WrapperBeanGenerator;
-import org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilder;
 import org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilderFactory;
 import org.apache.cxf.tools.util.AnnotationUtil;
 import org.apache.cxf.wsdl.WSDLConstants;
@@ -79,7 +79,7 @@
             System.setProperty("java.class.path", newCp + File.pathSeparator + oldClassPath);
         }
         ServiceBuilder builder = getServiceBuilder();
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         customize(service);
 

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
Fri Jun  8 02:47:24 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.tools.java2wsdl.processor.internal;
 
+import org.apache.cxf.service.ServiceBuilder;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.java2wsdl.processor.FrontendFactory;
 
@@ -51,12 +52,12 @@
             throw new ToolException("Can not find the ServiceBulider for style: " + s, e);
         }
         builder.setServiceClass(serviceClass);
-        builder.getServiceFactory().setServiceClass(serviceClass);
+        //builder.getServiceFactory().setServiceClass(serviceClass);
         return builder;
     }
 
     protected String getBuilderClassName(FrontendFactory.Style s) {
-        String pkgName = getClass().getPackage().getName();
+        String pkgName = "org.apache.cxf";
         return pkgName + "." + s.toString().toLowerCase() + "." + s + "ServiceBuilder";
     }
 

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGeneratorTest.java?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGeneratorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGeneratorTest.java
Fri Jun  8 02:47:24 2007
@@ -50,7 +50,7 @@
     }
     
     private ServiceInfo getServiceInfo() {
-        return processor.getServiceBuilder().build();
+        return processor.getServiceBuilder().createService();
     }
     
     @Test

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WrapperBeanGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WrapperBeanGeneratorTest.java?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WrapperBeanGeneratorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WrapperBeanGeneratorTest.java
Fri Jun  8 02:47:24 2007
@@ -50,7 +50,7 @@
     }
     
     private ServiceInfo getServiceInfo() {
-        return processor.getServiceBuilder().build();
+        return processor.getServiceBuilder().createService();
     }
     
     @Test

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
Fri Jun  8 02:47:24 2007
@@ -19,17 +19,19 @@
 
 package org.apache.cxf.tools.java2wsdl.processor.internal;
 
-import junit.framework.TestCase;
-
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
+import org.apache.cxf.service.ServiceBuilder;
+import org.apache.cxf.simple.SimpleServiceBuilder;
 import org.apache.cxf.tools.fortest.classnoanno.docbare.Stock;
 import org.apache.cxf.tools.fortest.simple.Hello;
 import org.apache.cxf.tools.java2wsdl.processor.FrontendFactory;
-import org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.JaxwsServiceBuilder;
-import org.apache.cxf.tools.java2wsdl.processor.internal.simple.SimpleServiceBuilder;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class ServiceBuilderFactoryTest extends TestCase {
+public class ServiceBuilderFactoryTest extends Assert {
     ServiceBuilderFactory factory = ServiceBuilderFactory.getInstance();
-    
+
+    @Test
     public void testGetBuilderClassName() {
         assertNotNull(factory);
         assertEquals(JaxwsServiceBuilder.class.getName(),
@@ -39,6 +41,7 @@
                      factory.getBuilderClassName(FrontendFactory.Style.Simple));
     }
 
+    @Test
     public void testGetJaxwsBuilder() {
         factory.setServiceClass(Stock.class);
         ServiceBuilder builder = factory.newBuilder();
@@ -46,6 +49,7 @@
         assertTrue(builder instanceof JaxwsServiceBuilder);
     }
 
+    @Test
     public void testGetSimpleBuilder() {
         factory.setServiceClass(Hello.class);
         ServiceBuilder builder = factory.newBuilder();

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=545465&r1=545464&r2=545465
==============================================================================
--- 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
Fri Jun  8 02:47:24 2007
@@ -22,6 +22,7 @@
 import java.io.File;
 
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ProcessorTestBase;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WSDL11Generator;
@@ -48,7 +49,7 @@
     public void testGeneratedWithElementryClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.classnoanno.docbare.Stock.class);
         builder.setAddress("http://localhost");
-        ServiceInfo service =  builder.build();
+        ServiceInfo service =  builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("stock_noanno_bare.wsdl");
         generator.generate(output);
@@ -63,7 +64,7 @@
     public void testGeneratedWithDocWrappedClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.classnoanno.docwrapped.Stock.class);
         builder.setAddress("http://localhost");
-        ServiceInfo service =  builder.build();
+        ServiceInfo service =  builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("stock_noanno_wrapped.wsdl");
         generator.generate(output);
@@ -83,7 +84,7 @@
     public void testGeneratedWithRPCClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.classnoanno.rpc.Stock.class);
         builder.setAddress("http://localhost");
-        ServiceInfo service =  builder.build();
+        ServiceInfo service =  builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("stock_noanno_rpc.wsdl");
         generator.generate(output);

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=545465&r1=545464&r2=545465
==============================================================================
--- 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
Fri Jun  8 02:47:24 2007
@@ -22,6 +22,7 @@
 import java.io.File;
 
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ProcessorTestBase;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WSDL11Generator;
@@ -49,7 +50,7 @@
     @Test
     public void testGreeter() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.jaxws.rpc.Greeter.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("rpc_greeter.wsdl");
         assertNotNull(output);

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=545465&r1=545464&r2=545465
==============================================================================
--- 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
Fri Jun  8 02:47:24 2007
@@ -26,6 +26,7 @@
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ProcessorTestBase;
@@ -70,7 +71,7 @@
     @Test
     public void testDocLitWrappedWithWrapperClass() {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.StockWrapped.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("doc_lit_wrapped_with_wrapperclass.wsdl");
         assertNotNull(output);
@@ -85,7 +86,7 @@
     @Test
     public void testDocLitWrappedWithoutWrapperClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.HelloWrapped.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File output = getOutputFile("doc_lit_wrapped_no_wrapperclass.wsdl");
@@ -102,7 +103,7 @@
     @Test
     public void testDocLitWrapped() throws Exception {
         builder.setServiceClass(org.apache.hello_world_doc_lit.Greeter.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("hello_doc_lit.wsdl");
         assertNotNull(output);
@@ -119,7 +120,7 @@
     //contain namespace
     public void testDocWrappedWithLocalName() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.Stock.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File output = getOutputFile("doc_lit_wrapped_localName.wsdl");
@@ -137,7 +138,7 @@
     //contain namespace
     public void testDocWrappedNoWebParam() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.HelloWithNoWebParam.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File output = getOutputFile("doc_lit_wrapped_no_webparam.wsdl");
@@ -155,7 +156,7 @@
     //"invalid XML schema: "header" must refer to an existing element"
     public void testHolder() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.holder.HolderService.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File output = getOutputFile("holder.wsdl");
@@ -171,7 +172,7 @@
     @Test
     public void testAsync() throws Exception {
         builder.setServiceClass(org.apache.hello_world_async_soap_http.GreeterAsync.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
         generator.setServiceModel(service);
         File output = getOutputFile("hello_async.wsdl");
         assertNotNull(output);
@@ -187,7 +188,7 @@
     public void testRPCLit() throws Exception {
         builder.setServiceClass(GreeterRPCLit.class);
         builder.setAddress("http://localhost");
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File file = getOutputFile("rpc_lit.wsdl");
@@ -205,7 +206,7 @@
     public void testDocWrapparBare() throws Exception {
         builder.setServiceClass(org.apache.hello_world_doc_wrapped_bare.Greeter.class);
         builder.setAddress("http://localhost");
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File file = getOutputFile("doc_wrapped_bare.wsdl");
@@ -219,7 +220,7 @@
     @Ignore
     public void testRPCWithoutParentBindingAnnotation() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.rpc.Hello.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File file = getOutputFile("rpc_lit_service_no_anno.wsdl");
@@ -234,7 +235,7 @@
     @Ignore
     public void testSOAPBindingRPCOnMethod() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.rpc.HelloWrongAnnotation.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File file = getOutputFile("rpc_on_method.wsdl");
@@ -248,7 +249,7 @@
     public void testSoapHeader() throws Exception {
 
         builder.setServiceClass(org.apache.samples.headers.HeaderTester.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File file = getOutputFile("soap_header.wsdl");
@@ -267,7 +268,7 @@
         Class clz = AnnotationUtil.loadClass("org.apache.cxf.tools.fortest.cxf188.Demo",
getClass()
             .getClassLoader());
         builder.setServiceClass(clz);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
 
         generator.setServiceModel(service);
         File file = getOutputFile("cxf188.wsdl");
@@ -279,7 +280,7 @@
     @Test
     public void testRpcLitNoSEI() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.rpc.EchoImpl.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
         assertNotNull(service);
 
         assertEquals(new QName("http://cxf.apache.org/echotest", "EchoService"),
@@ -309,7 +310,7 @@
         generator.setAllowImports(true);
         
         builder.setServiceClass(org.apache.cxf.tools.fortest.cxf669.HelloImpl.class);
-        ServiceInfo service = builder.build();
+        ServiceInfo service = builder.createService();
         assertNotNull(service);
         assertEquals(new QName("http://foo.com/HelloWorldService", "HelloService"), service.getName());
         assertEquals(new QName("http://foo.com/HelloWorld", "HelloWorld"), service.getInterface().getName());

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapperTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapperTest.java?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapperTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapperTest.java
Fri Jun  8 02:47:24 2007
@@ -23,6 +23,7 @@
 import java.util.List;
 
 import junit.framework.TestCase;
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -36,7 +37,7 @@
 
     private OperationInfo getOperation(Class clz, String opName) {
         builder.setServiceClass(clz);
-        ServiceInfo serviceInfo = builder.build();
+        ServiceInfo serviceInfo = builder.createService();
 
         for (OperationInfo op : serviceInfo.getInterface().getOperations()) {
             if (op.getUnwrappedOperation() != null

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapperTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapperTest.java?view=diff&rev=545465&r1=545464&r2=545465
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapperTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapperTest.java
Fri Jun  8 02:47:24 2007
@@ -22,6 +22,7 @@
 import java.lang.reflect.Method;
 
 import junit.framework.TestCase;
+import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -33,7 +34,7 @@
 
     private OperationInfo getOperation(Class clz, String opName) {
         builder.setServiceClass(clz);
-        ServiceInfo serviceInfo = builder.build();
+        ServiceInfo serviceInfo = builder.createService();
 
         for (OperationInfo op : serviceInfo.getInterface().getOperations()) {
             if (op.getUnwrappedOperation() != null



Mime
View raw message