cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r671732 - in /cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/ rt/frontend/s...
Date Thu, 26 Jun 2008 04:51:06 GMT
Author: ningjiang
Date: Wed Jun 25 21:51:06 2008
New Revision: 671732

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

........
  r671544 | ningjiang | 2008-06-25 21:13:04 +0800 (Wed, 25 Jun 2008) | 1 line
  
  CXF-1667 Get the wsdlLocation attribute work in <simple:server> and <jaxws:server>

........
  r671548 | ningjiang | 2008-06-25 21:46:44 +0800 (Wed, 25 Jun 2008) | 1 line
  
  CXF-1667 added the files which I forgot with my last commit
........

Added:
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/GreeterImplDoc.java
      - copied unchanged from r671548, cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/GreeterImplDoc.java
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/simple.wsdl
      - copied unchanged from r671548, cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/simple.wsdl
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/SpringBeansTest.java
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml

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

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java?rev=671732&r1=671731&r2=671732&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java
Wed Jun 25 21:51:06 2008
@@ -32,25 +32,25 @@
 
 public class NamespaceHandler extends NamespaceHandlerSupport {
     public void init() {
-        registerBeanDefinitionParser("client", new JaxWsProxyFactoryBeanDefinitionParser());
       
+        registerBeanDefinitionParser("client", new JaxWsProxyFactoryBeanDefinitionParser());
         registerBeanDefinitionParser("endpoint", new EndpointDefinitionParser());
         registerBeanDefinitionParser("schemaLocation", new StringBeanDefinitionParser());
-        
+
         ServerFactoryBeanDefinitionParser parser = new ServerFactoryBeanDefinitionParser();
-        parser.setBeanClass(JaxWsServerFactoryBean.class);
-        registerBeanDefinitionParser("server", parser);        
+        parser.setBeanClass(SpringServerFactoryBean.class);
+        registerBeanDefinitionParser("server", parser);
     }
-    
+
     public static class SpringServerFactoryBean extends JaxWsServerFactoryBean
         implements ApplicationContextAware {
-    
+
         public SpringServerFactoryBean() {
             super();
         }
         public SpringServerFactoryBean(JaxWsServiceFactoryBean fact) {
             super(fact);
         }
-        
+
         public void setApplicationContext(ApplicationContext ctx) throws BeansException {
             if (getBus() == null) {
                 Bus bus = BusFactory.getThreadDefaultBus();

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?rev=671732&r1=671731&r2=671732&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
Wed Jun 25 21:51:06 2008
@@ -48,6 +48,7 @@
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.jaxws.service.Hello;
+import org.apache.cxf.jaxws.spring.NamespaceHandler.SpringServerFactoryBean;
 import org.apache.cxf.transport.http.WSDLQueryHandler;
 import org.apache.hello_world_soap_http.Greeter;
 import org.junit.After;
@@ -56,7 +57,7 @@
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class SpringBeansTest extends Assert {
-    
+
     @After
     public void tearDown() throws Exception {
         if (BusFactory.getDefaultBus(false) != null) {
@@ -66,29 +67,29 @@
 
     @Test
     public void testEndpoints() throws Exception {
-        ClassPathXmlApplicationContext ctx = 
+        ClassPathXmlApplicationContext ctx =
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/endpoints.xml"});
 
         Object bean = ctx.getBean("simple");
         assertNotNull(bean);
-        
+
         EndpointImpl ep = (EndpointImpl) bean;
         assertNotNull(ep.getImplementor());
         assertNotNull(ep.getServer());
-        
+
         bean = ctx.getBean("simpleWithAddress");
         assertNotNull(bean);
-        
-        ep = (EndpointImpl) bean;        
+
+        ep = (EndpointImpl) bean;
         if (!(ep.getImplementor() instanceof org.apache.hello_world_soap_http.GreeterImpl))
{
             fail("can't get the right implementor object");
-        }        
-        assertEquals("http://localhost:8080/simpleWithAddress", 
+        }
+        assertEquals("http://localhost:8080/simpleWithAddress",
                      ep.getServer().getEndpoint().getEndpointInfo().getAddress());
-        
+
         bean = ctx.getBean("inlineImplementor");
         assertNotNull(bean);
-        
+
         ep = (EndpointImpl) bean;
         if (!(ep.getImplementor() instanceof org.apache.hello_world_soap_http.GreeterImpl))
{
             fail("can't get the right implementor object");
@@ -97,7 +98,7 @@
             (org.apache.hello_world_soap_http.GreeterImpl)ep.getImplementor();
         assertEquals("The property was not injected rightly", impl.getPrefix(), "hello");
         assertNotNull(ep.getServer());
-        
+
 
         bean = ctx.getBean("inlineInvoker");
         assertNotNull(bean);
@@ -105,13 +106,13 @@
         assertTrue(ep.getInvoker() instanceof NullInvoker);
         assertTrue(ep.getService().getInvoker() instanceof NullInvoker);
 
-        bean = ctx.getBean("simpleWithBindingUri");        
+        bean = ctx.getBean("simpleWithBindingUri");
         assertNotNull(bean);
         ep = (EndpointImpl) bean;
-        assertEquals("get the wrong bindingId", 
+        assertEquals("get the wrong bindingId",
                      ep.getBindingUri(),
                      "http://cxf.apache.org/bindings/xformat");
-        
+
         bean = ctx.getBean("simpleWithBinding");
         assertNotNull(bean);
         ep = (EndpointImpl) bean;
@@ -121,56 +122,56 @@
         assertTrue(sbc.getVersion() instanceof Soap12);
         assertTrue("the soap configure should set isMtomEnabled to be true",
                    sbc.isMtomEnabled());
-        
+
         bean = ctx.getBean("implementorClass");
         assertNotNull(bean);
         ep = (EndpointImpl) bean;
         assertEquals(Hello.class, ep.getImplementorClass());
         assertTrue(ep.getImplementor().getClass() == Object.class);
-        
+
         bean = ctx.getBean("epWithProps");
         assertNotNull(bean);
-        
+
         ep = (EndpointImpl) bean;
         assertEquals("bar", ep.getProperties().get("foo"));
-        
+
         bean = ctx.getBean("classImpl");
         assertNotNull(bean);
-        
+
         ep = (EndpointImpl) bean;
         assertTrue(ep.getImplementor() instanceof Hello);
-        
+
         QName name = ep.getServer().getEndpoint().getService().getName();
         assertEquals("http://service.jaxws.cxf.apache.org/service", name.getNamespaceURI());
         assertEquals("HelloServiceCustomized", name.getLocalPart());
-        
+
         name = ep.getServer().getEndpoint().getEndpointInfo().getName();
         assertEquals("http://service.jaxws.cxf.apache.org/endpoint", name.getNamespaceURI());
         assertEquals("HelloEndpointCustomized", name.getLocalPart());
-        
+
         bean = ctx.getBean("wsdlLocation");
         assertNotNull(bean);
-        
+
         bean = ctx.getBean("publishedEndpointUrl");
         assertNotNull(bean);
         String expectedEndpointUrl = "http://cxf.apache.org/Greeter";
         ep = (EndpointImpl) bean;
         assertEquals(expectedEndpointUrl, ep.getPublishedEndpointUrl());
-        
+
         // test for existence of Endpoint without an id element
         boolean found = false;
         String[] names = ctx.getBeanNamesForType(EndpointImpl.class);
         for (String n : names) {
-            if (n.startsWith(EndpointImpl.class.getPackage().getName())) { 
+            if (n.startsWith(EndpointImpl.class.getPackage().getName())) {
                 found = true;
             }
         }
         assertTrue("Could not find server factory with autogenerated id", found);
-        
+
         testInterceptors(ctx);
     }
 
-   
+
     private void testNamespaceMapping(ApplicationContext ctx) throws Exception {
         AnonymousComplexType act = (AnonymousComplexType) ctx.getBean("bookClient");
         Client client = ClientProxy.getClient(act);
@@ -202,7 +203,7 @@
         }
         assertTrue(saaj);
         assertTrue(logging);
-        
+
         saaj = false;
         logging = false;
         for (Interceptor<?> i : ep.getOutInterceptors()) {
@@ -214,19 +215,19 @@
         }
         assertTrue(saaj);
     }
-    
+
     @Test
     public void testServers() throws Exception {
-        ClassPathXmlApplicationContext ctx = 
+        ClassPathXmlApplicationContext ctx =
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/servers.xml"});
 
         JaxWsServerFactoryBean bean;
         BindingConfiguration bc;
         SoapBindingConfiguration sbc;
-        
+
         bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBindingRPC");
         assertNotNull(bean);
-        
+
         bc = bean.getBindingConfig();
         assertTrue(bc instanceof SoapBindingConfiguration);
         sbc = (SoapBindingConfiguration) bc;
@@ -240,48 +241,52 @@
         String wsdl = bout.toString();
         assertTrue(wsdl.contains("name=\"stringArray\""));
         assertTrue(wsdl.contains("name=\"stringArray\""));
-        
+
         bean = (JaxWsServerFactoryBean) ctx.getBean("simple");
         assertNotNull(bean);
 
+        bean = (JaxWsServerFactoryBean) ctx.getBean("inlineWsdlLocation");
+        assertNotNull(bean);
+        assertEquals(bean.getWsdlLocation(), "wsdl/hello_world_doc_lit.wsdl");
+
         bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBinding");
         assertNotNull(bean);
-        
+
         bc = bean.getBindingConfig();
         assertTrue(bc instanceof SoapBindingConfiguration);
         sbc = (SoapBindingConfiguration) bc;
         assertTrue("Not soap version 1.2: " + sbc.getVersion(),  sbc.getVersion() instanceof
Soap12);
-        
+
         bean = (JaxWsServerFactoryBean) ctx.getBean("inlineDataBinding");
-        
+
         boolean found = false;
-        String[] names = ctx.getBeanNamesForType(JaxWsServerFactoryBean.class);
+        String[] names = ctx.getBeanNamesForType(SpringServerFactoryBean.class);
         for (String n : names) {
-            if (n.startsWith(JaxWsServerFactoryBean.class.getName())) { 
+            if (n.startsWith(SpringServerFactoryBean.class.getName())) {
                 found = true;
             }
         }
         assertTrue("Could not find server factory with autogenerated id", found);
         testNamespaceMapping(ctx);
     }
-    
+
 
     @Test
     public void testClients() throws Exception {
-        ClassPathXmlApplicationContext ctx = 
+        ClassPathXmlApplicationContext ctx =
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/clients.xml"});
 
         Object bean = ctx.getBean("client1.proxyFactory");
         assertNotNull(bean);
-        
+
         Greeter greeter = (Greeter) ctx.getBean("client1");
         assertNotNull(greeter);
-        
+
         Client client = ClientProxy.getClient(greeter);
         assertNotNull("expected ConduitSelector", client.getConduitSelector());
         assertTrue("unexpected ConduitSelector",
                    client.getConduitSelector() instanceof NullConduitSelector);
-        
+
         List<Interceptor> inInterceptors = client.getInInterceptors();
         boolean saaj = false;
         boolean logging = false;
@@ -294,7 +299,7 @@
         }
         assertTrue(saaj);
         assertTrue(logging);
-        
+
         saaj = false;
         logging = false;
         for (Interceptor<?> i : client.getOutInterceptors()) {
@@ -306,17 +311,17 @@
         }
         assertTrue(saaj);
         assertTrue(logging);
-        
+
         assertTrue(client.getEndpoint().getService().getDataBinding() instanceof SourceDataBinding);
-        
+
         JaxWsProxyFactoryBean factory = (JaxWsProxyFactoryBean)ctx.getBean("wsdlLocation.proxyFactory");
         assertNotNull(factory);
         String wsdlLocation = factory.getWsdlLocation();
         assertEquals("We should get the right wsdl location" , wsdlLocation, "wsdl/hello_world.wsdl");
-        
+
         factory = (JaxWsProxyFactoryBean)ctx.getBean("inlineSoapBinding.proxyFactory");
         assertNotNull(factory);
-        
+
         BindingConfiguration bc = factory.getBindingConfig();
         assertTrue(bc instanceof SoapBindingConfiguration);
         SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
@@ -324,5 +329,5 @@
         assertTrue("the soap configure should set isMtomEnabled to be true",
                    sbc.isMtomEnabled());
     }
-    
+
 }

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml?rev=671732&r1=671731&r2=671732&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
Wed Jun 25 21:51:06 2008
@@ -28,7 +28,7 @@
 
   <import resource="classpath:META-INF/cxf/cxf.xml"/>
   <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
-    
+
   <bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
       <property name="transportIds">
           <list>
@@ -38,26 +38,26 @@
           </list>
       </property>
   </bean>
-   
+
   <jaxws:server id="simple" serviceBean="#greeter" xmlns:test="urn:foo" xmlns="urn:foo"/>
 
   <bean id="greeter" class="org.apache.hello_world_soap_http.GreeterImpl"/>
 
-  <jaxws:server id="simpleWithAddress" 
+  <jaxws:server id="simpleWithAddress"
     serviceBean="#greeter" address="http://localhost:8080/simpleWithAddress"/>
-  
+
   <jaxws:server id="inlineImplementor" address="http://localhost:8080/simpleWithAddress">
     <jaxws:serviceBean>
       <bean class="org.apache.hello_world_soap_http.GreeterImpl"/>
     </jaxws:serviceBean>
   </jaxws:server>
-  
-  <jaxws:server id="inlineInvoker" 
+
+  <jaxws:server id="inlineInvoker"
     serviceClass="org.apache.hello_world_soap_http.GreeterImpl"
-    address="http://localhost:8080/simpleWithAddress" 
-    bus="cxf" 
+    address="http://localhost:8080/simpleWithAddress"
+    bus="cxf"
     endpointName="e:SoapPort_Test1"
-    serviceName="s:SOAPService_Test1"    
+    serviceName="s:SOAPService_Test1"
     xmlns:e="http://apache.org/hello_world_soap_http"
     xmlns:s="http://apache.org/hello_world_soap_http">
     <jaxws:invoker>
@@ -71,10 +71,10 @@
       <bean class="org.apache.cxf.jaxb.JAXBDataBinding"/>
     </jaxws:dataBinding>
   </jaxws:server>
- 
+
   <jaxws:server id="bookServer"
   	serviceClass="org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeImpl"
-    address="http://localhost:8080/act" 
+    address="http://localhost:8080/act"
     bus="cxf">
     <jaxws:invoker>
       <bean class="org.apache.cxf.service.invoker.BeanInvoker">
@@ -97,35 +97,41 @@
       </jaxws:dataBinding>
   </jaxws:server>
 
-   <jaxws:client id="bookClient" 
+   <jaxws:client id="bookClient"
     serviceClass="org.apache.cxf.anonymous_complex_type.AnonymousComplexType"
     address="http://localhost:8080/act"/>
 
-  <jaxws:server id="inlineSoapBinding" 
+  <jaxws:server id="inlineSoapBinding"
     serviceClass="org.apache.cxf.jaxws.service.Hello"
     address="http://localhost:8080/test">
     <jaxws:binding>
       <soap:soapBinding mtomEnabled="true" version="1.2"/>
     </jaxws:binding>
   </jaxws:server>
-  
-  <jaxws:server id="inlineSoapBindingRPC" 
+
+  <jaxws:server id="inlineWsdlLocation"
+    serviceClass="org.apache.cxf.jaxws.service.GreeterImplDoc"
+    address="http://localhost:8080/wsdl"
+    wsdlLocation="wsdl/hello_world_doc_lit.wsdl">
+  </jaxws:server>
+
+  <jaxws:server id="inlineSoapBindingRPC"
     serviceClass="org.apache.cxf.jaxws.service.Hello"
     address="http://localhost:8080/testrpc">
     <jaxws:binding>
       <soap:soapBinding style="rpc"/>
     </jaxws:binding>
   </jaxws:server>
-  
-  <jaxws:server id="inlineDataBinding" 
+
+  <jaxws:server id="inlineDataBinding"
     serviceClass="org.apache.cxf.jaxws.service.Hello"
     address="http://localhost:8080/test">
     <jaxws:dataBinding>
       <bean class="org.apache.cxf.jaxb.JAXBDataBinding"/>
     </jaxws:dataBinding>
   </jaxws:server>
-  
+
   <!-- We should auto generate this id -->
   <jaxws:server serviceBean="#greeter"/>
-  
+
 </beans>

Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java?rev=671732&r1=671731&r2=671732&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ServerFactoryBean.java
Wed Jun 25 21:51:06 2008
@@ -50,9 +50,9 @@
 
 
 /**
- * This class helps take a {@link org.apache.cxf.service.Service} and 
+ * This class helps take a {@link org.apache.cxf.service.Service} and
  * expose as a server side endpoint.
- * If there is no Service, it can create one for you using a 
+ * If there is no Service, it can create one for you using a
  * {@link ReflectionServiceFactoryBean}.
  * <p>
  * For most scenarios you'll want to just have the ServerFactoryBean handle everything
@@ -87,14 +87,14 @@
     private Object serviceBean;
     private List<String> schemaLocations;
     private Invoker invoker;
-    
+
     public ServerFactoryBean() {
-        this(new ReflectionServiceFactoryBean());       
+        this(new ReflectionServiceFactoryBean());
     }
     public ServerFactoryBean(ReflectionServiceFactoryBean sbean) {
         super(sbean);
     }
-    
+
     public String getBeanName() {
         return this.getClass().getName();
     }
@@ -110,21 +110,21 @@
             } else if (serviceBean != null) {
                 getServiceFactory().setInvoker(createInvoker());
             }
-            
+
             Endpoint ep = createEndpoint();
-            server = new ServerImpl(getBus(), 
-                                    ep, 
-                                    getDestinationFactory(), 
+            server = new ServerImpl(getBus(),
+                                    ep,
+                                    getDestinationFactory(),
                                     getBindingFactory());
-            
+
             if (invoker == null) {
                 if (serviceBean != null) {
                     ep.getService().setInvoker(createInvoker());
-                }    
+                }
             } else {
                 ep.getService().setInvoker(invoker);
             }
-            
+
             if (start) {
                 server.start();
             }
@@ -135,29 +135,29 @@
         } catch (IOException e) {
             throw new ServiceConstructionException(e);
         }
-        
+
         if (serviceBean != null) {
             initializeAnnotationInterceptors(server.getEndpoint(),
                                              ClassHelper.getRealClass(getServiceBean()));
         }
-        
+
         applyFeatures();
         return server;
     }
 
-    
+
     @Override
     protected void initializeServiceFactory() {
         super.initializeServiceFactory();
-        
+
         DataBinding db = getServiceFactory().getDataBinding();
         if (db instanceof AbstractDataBinding && schemaLocations != null) {
             ResourceManager rr = getBus().getExtension(ResourceManager.class);
-            
+
             List<DOMSource> schemas = new ArrayList<DOMSource>();
             for (String l : schemaLocations) {
                 URL url = rr.resolveResource(l, URL.class);
-                
+
                 if (url == null) {
                     URIResolver res;
                     try {
@@ -165,13 +165,13 @@
                     } catch (IOException e) {
                         throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL",
LOG), e);
                     }
-                    
+
                     if (!res.isResolved()) {
                         throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL",
LOG));
                     }
                     url = res.getURL();
                 }
-                
+
                 Document d;
                 try {
                     d = DOMUtils.readXml(url.openStream());
@@ -181,7 +181,7 @@
                 }
                 schemas.add(new DOMSource(d, url.toString()));
             }
-            
+
             ((AbstractDataBinding)db).setSchemas(schemas);
         }
     }
@@ -204,8 +204,8 @@
             }
         }
     }
-      
-    
+
+
     protected Invoker createInvoker() {
         return new BeanInvoker(getServiceBean());
     }
@@ -230,10 +230,10 @@
         this.start = start;
     }
 
-    public Object getServiceBean() {        
+    public Object getServiceBean() {
         return serviceBean;
     }
-    
+
     public Class<?> getServiceBeanClass() {
         if (serviceBean != null) {
             return ClassHelper.getRealClass(serviceBean);
@@ -245,7 +245,7 @@
     /**
      * Set the backing service bean. If this is set a BeanInvoker is created for
      * the provided bean.
-     * 
+     *
      * @return
      */
     public void setServiceBean(Object serviceBean) {
@@ -268,4 +268,12 @@
         this.invoker = invoker;
     }
 
+    public void setWsdlLocation(String location) {
+        setWsdlURL(location);
+    }
+
+    public String getWsdlLocation() {
+        return getWsdlURL();
+    }
+
 }

Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/SpringBeansTest.java?rev=671732&r1=671731&r2=671732&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/SpringBeansTest.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/SpringBeansTest.java
Wed Jun 25 21:51:06 2008
@@ -19,7 +19,6 @@
 package org.apache.cxf.frontend.spring;
 
 import java.util.List;
-
 import junit.framework.Assert;
 
 import org.apache.cxf.binding.BindingConfiguration;
@@ -42,6 +41,8 @@
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+
+
 public class SpringBeansTest extends Assert {
 
     @Test
@@ -63,8 +64,6 @@
         bean = (ServerFactoryBean) ctx.getBean("inlineSoapBinding");
         assertNotNull(bean);
 
-
-
         BindingConfiguration bc = bean.getBindingConfig();
         assertTrue(bc instanceof SoapBindingConfiguration);
         SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
@@ -75,6 +74,9 @@
                      bean.getBindingId(),
                      "http://cxf.apache.org/bindings/xformat");
 
+        bean = (ServerFactoryBean) ctx.getBean("simpleWithWSDL");
+        assertNotNull(bean);
+        assertEquals(bean.getWsdlLocation(), "org/apache/cxf/frontend/spring/simple.wsdl");
     }
 
     @Test

Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml?rev=671732&r1=671731&r2=671732&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/servers.xml
Wed Jun 25 21:51:06 2008
@@ -29,7 +29,7 @@
   <import resource="classpath:META-INF/cxf/cxf.xml"/>
   <import resource="classpath:META-INF/cxf/cxf-extension-xml.xml"/>
   <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
-    
+
   <bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
       <property name="transportIds">
           <list>
@@ -40,25 +40,30 @@
           </list>
       </property>
   </bean>
-  
+
   <simple:server id="simple" serviceBean="#greeter"/>
 
   <bean id="greeter" class="org.apache.cxf.service.factory.HelloServiceImpl"/>
 
-  <simple:server id="simpleWithAddress" 
+  <simple:server id="simpleWithAddress"
     serviceBean="#greeter" address="http://localhost:8080/simpleWithAddress"/>
-  
-  <simple:server id="simpleWithBindingId" 
+
+  <simple:server id="simpleWithWSDL"
+    serviceBean="#greeter"
+    wsdlLocation="org/apache/cxf/frontend/spring/simple.wsdl"
+    address="http://localhost:8080/simpleWithWSDL"/>
+
+  <simple:server id="simpleWithBindingId"
     serviceBean="#greeter" address="http://localhost:8080/simpleWithAddress"
     bindingId="http://cxf.apache.org/bindings/xformat"/>
-    
+
   <simple:server id="inlineImplementor" address="http://localhost:8080/simpleWithAddress">
     <simple:serviceBean>
       <bean class="org.apache.cxf.service.factory.HelloServiceImpl"/>
     </simple:serviceBean>
   </simple:server>
-  
-  <simple:server id="inlineInvoker" 
+
+  <simple:server id="inlineInvoker"
     serviceClass="org.apache.cxf.service.factory.HelloServiceImpl"
     address="http://localhost:8080/simpleWithAddress">
     <simple:invoker>
@@ -68,13 +73,13 @@
         </constructor-arg>
       </bean>
     </simple:invoker>
-    
+
   </simple:server>
-  
-  <simple:server id="inlineSoapBinding" 
+
+  <simple:server id="inlineSoapBinding"
     serviceClass="org.apache.cxf.service.factory.HelloService"
     serviceBean="#greeter"
-    address="http://localhost:8080/test"   
+    address="http://localhost:8080/test"
     serviceName="t:HelloService"
     xmlns:t="http://apache.org/hello_world_soap_http"
     endpointName="t:HelloPort"



Mime
View raw message