cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r576717 - in /incubator/cxf/trunk/rt: databinding/aegis/src/test/java/org/apache/cxf/aegis/ databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ databinding/aegis/...
Date Tue, 18 Sep 2007 06:04:52 GMT
Author: ningjiang
Date: Mon Sep 17 23:04:49 2007
New Revision: 576717

URL: http://svn.apache.org/viewvc?rev=576717&view=rev
Log:
CXF-1029 clean up the ServerFactoryBean's serverBean stuff

Modified:
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/AbstractAegisTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java

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?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- 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
Mon Sep 17 23:04:49 2007
@@ -110,18 +110,26 @@
     }
     
     public Server createService(Class serviceClass, QName name) {
-        return createService(serviceClass, serviceClass.getSimpleName(), name);
+        return createService(serviceClass, null, name);
     }
     
-    public Server createService(Class serviceClass, 
+    public Server createService(Class serviceClass, Object serviceBean, QName name) {
+        return createService(serviceClass, serviceBean, serviceClass.getSimpleName(), name);
+    }
+    
+    public Server createService(Class serviceClass, Object serviceBean, 
                                 String address, QName name) {
-        ServerFactoryBean sf = createServiceFactory(serviceClass, address, name);
+        ServerFactoryBean sf = createServiceFactory(serviceClass, serviceBean, address, name);
         return sf.create();
     }
 
-    protected ServerFactoryBean createServiceFactory(Class serviceClass, String address,
QName name) {
+    protected ServerFactoryBean createServiceFactory(Class serviceClass, 
+                                                     Object serviceBean, String address,
QName name) {
         ServerFactoryBean sf = new ServerFactoryBean();
         sf.setServiceClass(serviceClass);
+        if (serviceBean != null) {
+            sf.setServiceBean(serviceBean);
+        }    
         sf.getServiceFactory().setServiceName(name);
         sf.setAddress("local://" + address);
         setupAegis(sf);

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/exception/ExceptionTest.java
Mon Sep 17 23:04:49 2007
@@ -30,7 +30,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        Server s = createService(ExceptionService.class, null);
+        Server s = createService(ExceptionService.class, new ExceptionServiceImpl(), null);
         s.getEndpoint().getService().setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
     }
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ExceptionInheritanceTest.java
Mon Sep 17 23:04:49 2007
@@ -63,14 +63,15 @@
         
         client = (WS1) pf.create();
 
-        Server server = createService(WS1.class, "WS1", null);
+        Server server = createService(WS1.class, new WS1Impl(), "WS1", null);
         new LoggingFeature().initialize(server, null);
         server.getEndpoint().getService().setInvoker(new BeanInvoker(new WS1Impl()));
     }
 
     @Override
-    protected ServerFactoryBean createServiceFactory(Class serviceClass, String address,
QName name) {
-        ServerFactoryBean sf = super.createServiceFactory(serviceClass, address, name);
+    protected ServerFactoryBean createServiceFactory(Class serviceClass, 
+                                                     Object serviceBean, String address,
QName name) {
+        ServerFactoryBean sf = super.createServiceFactory(serviceClass, serviceBean, address,
name);
         sf.getServiceFactory().setProperties(props);
         return sf;
     }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/InheritancePOJOTest.java
Mon Sep 17 23:04:49 2007
@@ -44,7 +44,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        ServerFactoryBean sf = createServiceFactory(InheritanceService.class, "InheritanceService",
+        ServerFactoryBean sf = createServiceFactory(InheritanceService.class, null, "InheritanceService",
                                                     new QName("urn:xfire:inheritance", "InheritanceService"));
 
         Map<String, Object> props = new HashMap<String, Object>();

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java
Mon Sep 17 23:04:49 2007
@@ -36,7 +36,7 @@
     @Before 
     public void setUp() throws Exception {
         super.setUp();
-        createService(BeanService.class, "BeanService", null);
+        createService(BeanService.class, null, "BeanService", null);
         createService(ArrayService.class, "Array", new QName("urn:Array", "Array"));
     }
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/proxy/ProxyTest.java
Mon Sep 17 23:04:49 2007
@@ -33,7 +33,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        Server s = createService(HelloProxyService.class, null);
+        Server s = createService(HelloProxyService.class, new HelloProxyServiceImpl(), null);
         s.getEndpoint().getService().setInvoker(new BeanInvoker(new HelloProxyServiceImpl()));
     }
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
Mon Sep 17 23:04:49 2007
@@ -172,15 +172,16 @@
 
     @Test
     public void testCollectionServiceWSDL() throws Exception {
-        createService(CollectionService.class, null);
+        
+        createService(CollectionService.class, new CollectionService(), null);
 
         Document wsdl = getWSDLDocument("CollectionService");
         assertValid("//xsd:element[@name='return'][@type='tns:ArrayOfString']", wsdl);
     }
 
     @Test
-    public void testUnannotatedStrings() throws Exception {
-        createService(CollectionService.class, null);
+    public void testUnannotatedStrings() throws Exception {        
+        createService(CollectionService.class, new CollectionService(), null);
 
         Document doc = getWSDLDocument("CollectionService");
         // printNode(doc);
@@ -191,6 +192,7 @@
     }
 
     public class CollectionService {
+        
         public Collection<String> getStrings() {
             return null;
         }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XmlParamTypeTest.java
Mon Sep 17 23:04:49 2007
@@ -64,7 +64,7 @@
 
     @Test
     public void testMapServiceWSDL() throws Exception {
-        createService(CustomTypeService.class, null);
+        createService(CustomTypeService.class, new CustomTypeService(), null);
 
         Document wsdl = getWSDLDocument("CustomTypeService");
         assertValid("//xsd:element[@name='s'][@type='ns0:custom']", wsdl);

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/MissingTypeWSDLTest.java
Mon Sep 17 23:04:49 2007
@@ -31,7 +31,7 @@
     
     @Test
     public void testMissingTransliteration() throws Exception {
-        Server server = createService(MissingType.class, null);
+        Server server = createService(MissingType.class, new MissingTypeImpl(), null);
         Service service = server.getEndpoint().getService();
         service.setInvoker(new BeanInvoker(new MissingTypeImpl()));
         ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
Mon Sep 17 23:04:49 2007
@@ -172,7 +172,7 @@
     private void buildHandlerChain() {
         AnnotationHandlerChainBuilder builder = new AnnotationHandlerChainBuilder();
 
-        List<Handler> chain = builder.buildHandlerChainFromClass(getServiceBean().getClass(),
+        List<Handler> chain = builder.buildHandlerChainFromClass(getServiceBeanClass(),
                                                                  getEndpointName());
         for (Handler h : chain) {
             injectResources(h);

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?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- 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
Mon Sep 17 23:04:49 2007
@@ -55,6 +55,7 @@
         ServerFactoryBean svrFactory = new ServerFactoryBean();
         svrFactory.setBus(bus);
         svrFactory.setServiceFactory(bean);
+        svrFactory.setServiceBean(clazz.newInstance());
         svrFactory.setAddress(address);
         svrFactory.create();
         

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/GreeterTest.java
Mon Sep 17 23:04:49 2007
@@ -45,7 +45,7 @@
         bean.setServiceClass(GreeterImpl.class);
         GreeterImpl greeter = new GreeterImpl();
         BeanInvoker invoker = new BeanInvoker(greeter);
-        bean.setInvoker(invoker);
+        
         
         Service service = bean.create();
 
@@ -55,6 +55,7 @@
         ServerFactoryBean svr = new ServerFactoryBean();
         svr.setBus(bus);
         svr.setServiceFactory(bean);
+        svr.setInvoker(invoker);
         
         svr.create();
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
Mon Sep 17 23:04:49 2007
@@ -27,6 +27,7 @@
 import org.w3c.dom.Document;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.calculator.CalculatorImpl;
 import org.apache.cxf.calculator.CalculatorPortType;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
@@ -129,6 +130,7 @@
     public void testJaxwsServiceClass() throws Exception {
         JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
         factory.setServiceClass(CalculatorPortType.class);
+        factory.setServiceBean(new CalculatorImpl());
         String address = "http://localhost:9001/jaxwstest";
         factory.setAddress(address);
         Server server = factory.create();

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
Mon Sep 17 23:04:49 2007
@@ -113,7 +113,7 @@
             if (invoker == null) {
                 if (serviceBean != null) {
                     ep.getService().setInvoker(createInvoker());
-                }
+                }    
             } else {
                 ep.getService().setInvoker(invoker);
             }
@@ -129,7 +129,7 @@
             throw new ServiceConstructionException(e);
         }
         
-        if (getServiceBean() != null) {
+        if (serviceBean != null) {
             initializeAnnotationInterceptors(server.getEndpoint(), this.getServiceBean().getClass());
         }
         
@@ -199,7 +199,7 @@
       
     
     protected Invoker createInvoker() {
-        return new BeanInvoker(serviceBean);
+        return new BeanInvoker(getServiceBean());
     }
 
     public Server getServer() {
@@ -222,11 +222,16 @@
         this.start = start;
     }
 
-    public Object getServiceBean() {
-        if (serviceBean == null) {
+    public Object getServiceBean() {        
+        return serviceBean;
+    }
+    
+    public Class<?> getServiceBeanClass() {
+        if (serviceBean != null) {
+            return serviceBean.getClass();
+        } else {
             return getServiceFactory().getServiceClass();
         }
-        return serviceBean;
     }
 
     /**

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
Mon Sep 17 23:04:49 2007
@@ -73,6 +73,7 @@
   
   <simple:server id="inlineSoapBinding" 
     serviceClass="org.apache.cxf.service.factory.HelloService"
+    serviceBean="#greeter"
     address="http://localhost:8080/test"   
     serviceName="t:HelloService"
     xmlns:t="http://apache.org/hello_world_soap_http"

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java
Mon Sep 17 23:04:49 2007
@@ -138,6 +138,7 @@
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
         svrBean.setServiceFactory(serviceFactory);
+        svrBean.setServiceBean(new HelloServiceImpl());
         svrBean.setBus(getBus());
         
         Map<String, Object> props = new HashMap<String, Object>();

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ServerFactoryTest.java
Mon Sep 17 23:04:49 2007
@@ -46,6 +46,7 @@
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
         svrBean.setServiceClass(HelloService.class);
+        svrBean.setServiceBean(new HelloServiceImpl());
         svrBean.setBus(getBus());
         svrBean.setDestinationFactory(new CustomDestinationFactory());
 
@@ -53,12 +54,13 @@
         assertTrue(server.getDestination() instanceof CustomDestination);
     }
     
+        
     @SuppressWarnings("unchecked")
     @Test
     public void testJaxbExtraClass() throws Exception {
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
-        svrBean.setServiceClass(HelloService.class);
+        svrBean.setServiceClass(HelloServiceImpl.class);
         svrBean.setBus(getBus());
 
         Map props = svrBean.getProperties();

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java?rev=576717&r1=576716&r2=576717&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/StaxDatabindingTest.java
Mon Sep 17 23:04:49 2007
@@ -45,7 +45,7 @@
         sf.setAddress(address);
         sf.setDataBinding(new StaxDataBinding());
         sf.getFeatures().add(new StaxDataBindingFeature());
-
+        sf.setBus(getBus());
         sf.create();
         
         Node res = invoke(address, LocalTransportFactory.TRANSPORT_ID, "req.xml");



Mime
View raw message