cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r467382 - in /incubator/cxf/trunk/rt: bindings/http/src/test/java/org/apache/cxf/binding/http/ bindings/http/src/test/java/org/apache/cxf/binding/http/bare/ bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/ frontend/jaxws/src...
Date Tue, 24 Oct 2006 16:53:39 GMT
Author: dandiep
Date: Tue Oct 24 09:53:38 2006
New Revision: 467382

URL: http://svn.apache.org/viewvc?view=rev&rev=467382
Log:
Simply Server creation by having the ServerFactoryBean handle the ServiceFactory for you(if
you want). This should make it real easy for Spring users. Still need to integrateProvider
support into the JaxWsServerFactoryBean.

Added:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
  (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
  (with props)
Removed:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsEndpointProxyFactoryBean.java
Modified:
    incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/AbstractRestTest.java
    incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/bare/BareServiceTest.java
    incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/WrappedServiceTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java

Modified: incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/AbstractRestTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/AbstractRestTest.java?view=diff&rev=467382&r1=467381&r2=467382
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/AbstractRestTest.java
(original)
+++ incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/AbstractRestTest.java
Tue Oct 24 09:53:38 2006
@@ -26,6 +26,7 @@
 import java.net.URL;
 
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
 
 import org.w3c.dom.Document;
 
@@ -38,7 +39,8 @@
 import org.apache.cxf.test.AbstractCXFTest;
 
 public abstract class AbstractRestTest extends AbstractCXFTest {
-
+    boolean debug;
+    
     protected Bus createBus() throws BusException {
         return new SpringBusFactory().createBus();
     }
@@ -78,6 +80,15 @@
         copy(msgIs, out);
 
         InputStream is = c.getInputStream();
-        return DOMUtils.readXml(is);
+        Document res = DOMUtils.readXml(is);
+        
+        if (debug) {
+            try {
+                DOMUtils.writeXml(res, System.out);
+            } catch (TransformerException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return res;
     }
 }

Modified: incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/bare/BareServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/bare/BareServiceTest.java?view=diff&rev=467382&r1=467381&r2=467382
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/bare/BareServiceTest.java
(original)
+++ incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/bare/BareServiceTest.java
Tue Oct 24 09:53:38 2006
@@ -26,10 +26,7 @@
 import org.apache.cxf.binding.http.HttpBindingInfoFactoryBean;
 import org.apache.cxf.binding.http.URIMapper;
 import org.apache.cxf.endpoint.ServerImpl;
-import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.factory.ServerFactoryBean;
+import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.transport.http.JettyHTTPDestination;
 
@@ -38,30 +35,19 @@
         BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class);
         bfm.registerBindingFactory(HttpBindingFactory.HTTP_BINDING_ID, new HttpBindingFactory());
         
-        JaxWsServiceFactoryBean sf = new JaxWsServiceFactoryBean();
+        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.setBus(getBus());
         sf.setServiceClass(CustomerService.class);
-        sf.setWrapped(false);
+        sf.getServiceFactory().setWrapped(false);
+        sf.setBindingFactory(new HttpBindingInfoFactoryBean());
+        sf.setAddress("http://localhost:9001/");
+        sf.setStart(false);
         
-        Service service = sf.create();
-        assertNotNull(service.getServiceInfo());
-        assertEquals("http://cxf.apache.org/jra", service.getName().getNamespaceURI());
-        
-        HttpBindingInfoFactoryBean jraFactory = new HttpBindingInfoFactoryBean();
-        
-        ServerFactoryBean svrFactory = new ServerFactoryBean();
-        svrFactory.setServiceFactory(sf);
-        svrFactory.setBus(getBus());
-        svrFactory.setBindingFactory(jraFactory);
-        svrFactory.setAddress("http://localhost:9001/");
-        svrFactory.setTransportId("http://schemas.xmlsoap.org/wsdl/http/");
-        svrFactory.setStart(false);
-        
-        ServerImpl svr = (ServerImpl) svrFactory.create();
+        ServerImpl svr = (ServerImpl) sf.create();
         ((JettyHTTPDestination) svr.getDestination()).setContextMatchStrategy("stem");
         svr.start();
                 
-        URIMapper mapper = (URIMapper) service.get(URIMapper.class.getName());
+        URIMapper mapper = (URIMapper) svr.getEndpoint().getService().get(URIMapper.class.getName());
         assertNotNull(mapper);
         
         BindingOperationInfo bop = mapper.getOperation("/customers", "GET", null);
@@ -84,8 +70,7 @@
         
         Document res = get("http://localhost:9001/customers");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
-        
+
         addNamespace("c", "http://cxf.apache.org/jra");
         assertValid("/c:customers", res);
         assertValid("/c:customers/c:customer/c:id[text()='123']", res);
@@ -93,7 +78,6 @@
         
         res = get("http://localhost:9001/customers/123");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
         
         addNamespace("c", "http://cxf.apache.org/jra");
         assertValid("/c:customer", res);
@@ -102,24 +86,20 @@
         
         res = put("http://localhost:9001/customers/123", "update.xml");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
         
         assertValid("/c:updateCustomer", res);
         
         res = post("http://localhost:9001/customers", "add.xml");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
         
         assertValid("/c:addCustomer", res);
 
         // Get the updated document
         res = get("http://localhost:9001/customers/123");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
         
         assertValid("/c:customer", res);
         assertValid("/c:customer/c:id[text()='123']", res);
-        // Get update working
         assertValid("/c:customer/c:name[text()='Danno Manno']", res);
         
         svr.stop();

Modified: incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/WrappedServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/WrappedServiceTest.java?view=diff&rev=467382&r1=467381&r2=467382
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/WrappedServiceTest.java
(original)
+++ incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/WrappedServiceTest.java
Tue Oct 24 09:53:38 2006
@@ -26,10 +26,7 @@
 import org.apache.cxf.binding.http.HttpBindingInfoFactoryBean;
 import org.apache.cxf.binding.http.URIMapper;
 import org.apache.cxf.endpoint.ServerImpl;
-import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.factory.ServerFactoryBean;
+import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.transport.http.JettyHTTPDestination;
 
@@ -38,30 +35,19 @@
         BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class);
         bfm.registerBindingFactory(HttpBindingFactory.HTTP_BINDING_ID, new HttpBindingFactory());
         
-        JaxWsServiceFactoryBean sf = new JaxWsServiceFactoryBean();
+        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.setBus(getBus());
         sf.setServiceClass(CustomerService.class);
-        sf.setWrapped(true);
+        sf.getServiceFactory().setWrapped(true);
+        sf.setBindingFactory(new HttpBindingInfoFactoryBean());
+        sf.setAddress("http://localhost:9001/");
+        sf.setStart(false);
         
-        Service service = sf.create();
-        assertNotNull(service.getServiceInfo());
-        assertEquals("http://cxf.apache.org/jra", service.getName().getNamespaceURI());
-        
-        HttpBindingInfoFactoryBean jraFactory = new HttpBindingInfoFactoryBean();
-        
-        ServerFactoryBean svrFactory = new ServerFactoryBean();
-        svrFactory.setServiceFactory(sf);
-        svrFactory.setBus(getBus());
-        svrFactory.setBindingFactory(jraFactory);
-        svrFactory.setAddress("http://localhost:9001/");
-        svrFactory.setTransportId("http://schemas.xmlsoap.org/wsdl/http/");
-        svrFactory.setStart(false);
-        
-        ServerImpl svr = (ServerImpl) svrFactory.create();
+        ServerImpl svr = (ServerImpl) sf.create();
         ((JettyHTTPDestination) svr.getDestination()).setContextMatchStrategy("stem");
         svr.start();
                 
-        URIMapper mapper = (URIMapper) service.get(URIMapper.class.getName());
+        URIMapper mapper = (URIMapper) svr.getEndpoint().getService().get(URIMapper.class.getName());
         assertNotNull(mapper);
         
         BindingOperationInfo bop = mapper.getOperation("/customers", "GET", null);
@@ -85,7 +71,6 @@
         
         Document res = get("http://localhost:9001/customers");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
         
         addNamespace("c", "http://cxf.apache.org/jra");
         assertValid("/c:getCustomersResponse/c:customers", res);
@@ -94,8 +79,7 @@
         
         res = get("http://localhost:9001/customers/123");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
-        
+
         addNamespace("c", "http://cxf.apache.org/jra");
         assertValid("/c:getCustomerResponse/c:customer", res);
         assertValid("/c:getCustomerResponse/c:customer/c:id[text()='123']", res);
@@ -103,21 +87,18 @@
         
         res = put("http://localhost:9001/customers/123", "update.xml");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
-        
+
         assertValid("/c:updateCustomerResponse", res);
         
         res = post("http://localhost:9001/customers", "add.xml");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
-        
+
         assertValid("/c:addCustomerResponse", res);
 
         // Get the updated document
         res = get("http://localhost:9001/customers/123");
         assertNotNull(res);
-        DOMUtils.writeXml(res, System.out);
-        
+
         assertValid("/c:getCustomerResponse/c:customer", res);
         assertValid("/c:getCustomerResponse/c:customer/c:id[text()='123']", res);
         assertValid("/c:getCustomerResponse/c:customer/c:name[text()='Danno Manno']", res);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?view=diff&rev=467382&r1=467381&r2=467382
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
Tue Oct 24 09:53:38 2006
@@ -54,8 +54,6 @@
 import org.apache.cxf.service.factory.AbstractBindingInfoFactoryBean;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.factory.ServerFactoryBean;
-import org.apache.cxf.transport.DestinationFactory;
-import org.apache.cxf.transport.DestinationFactoryManager;
 
 public class EndpointImpl extends javax.xml.ws.Endpoint {
     private static final Logger LOG = LogUtils.getL7dLogger(JaxWsServiceFactoryBean.class);
@@ -205,22 +203,6 @@
 
     protected void doPublish(String address) {
 
-        String transportId = null;
-        if (address != null) {
-            DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
-            DestinationFactory df = dfm.getDestinationFactoryForUri(address);
-            if (df != null) {
-                transportId = df.getTransportIds().get(0);
-            }
-        }
-        
-        if (transportId == null) {
-            // TODO: we shouldn't have to do this, but the DF is null because the
-            // LocalTransport doesn't return for the http:// uris
-            // People also seem to be supplying a null JMS address, which is worrying
-            transportId = "http://schemas.xmlsoap.org/wsdl/soap/http";
-        }
-        
         ServerFactoryBean svrFactory = new ServerFactoryBean();
         svrFactory.setBus(bus);
         svrFactory.setAddress(address);
@@ -233,14 +215,10 @@
             bindingFactory = new XMLBindingInfoFactoryBean();
         } else {
             // Just assume soap otherwise...
-            JaxWsSoapBindingInfoFactoryBean soapBindingFactory = new JaxWsSoapBindingInfoFactoryBean();
-            soapBindingFactory.setTransportURI(transportId);
-            transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
-            bindingFactory = soapBindingFactory;
+            bindingFactory = new JaxWsSoapBindingInfoFactoryBean();
         }
         
         svrFactory.setBindingFactory(bindingFactory);
-        svrFactory.setTransportId(transportId);
         
         server = svrFactory.create();
 

Added: 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?view=auto&rev=467382
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
(added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
Tue Oct 24 09:53:38 2006
@@ -0,0 +1,31 @@
+/**
+ * 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.jaxws;
+
+import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
+import org.apache.cxf.service.factory.ServerFactoryBean;
+
+/**
+ * Bean to help easily create Server endpoints for JAX-WS.
+ */
+public class JaxWsServerFactoryBean extends ServerFactoryBean {
+    public JaxWsServerFactoryBean() {
+        setServiceFactory(new JaxWsServiceFactoryBean());
+    }
+}

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

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=467382&r1=467381&r2=467382
==============================================================================
--- 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
Tue Oct 24 09:53:38 2006
@@ -93,7 +93,6 @@
         ServerFactoryBean svrFactory = new ServerFactoryBean();
         svrFactory.setBus(bus);
         svrFactory.setServiceFactory(bean);
-        svrFactory.setTransportId("http://schemas.xmlsoap.org/soap/");
         svrFactory.setAddress(address);
         svrFactory.create();
         

Added: 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?view=auto&rev=467382
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
(added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
Tue Oct 24 09:53:38 2006
@@ -0,0 +1,35 @@
+/**
+ * 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.jaxws;
+
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.jaxws.service.Hello;
+
+public class JaxWsServerFactoryBeanTest extends AbstractJaxWsTest {
+    public void testBean() {
+        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
+        sf.setBus(getBus());
+        sf.setAddress("http://localhost:9000/test");
+        sf.setServiceClass(Hello.class);
+        sf.setStart(false);
+        
+        Server server = sf.create();
+        assertNotNull(server);
+    }
+}

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java?view=diff&rev=467382&r1=467381&r2=467382
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
Tue Oct 24 09:53:38 2006
@@ -48,6 +48,7 @@
     private AbstractBindingInfoFactoryBean bindingFactory;
     private QName endpointName;
     private boolean start = true;
+    private Class serviceClass;
     
     public ServerFactoryBean() {
         super();
@@ -58,6 +59,12 @@
         try {
             service = serviceFactory.getService();
             
+            if (service == null) {
+                serviceFactory.setServiceClass(serviceClass);
+                serviceFactory.setBus(bus);
+                service = serviceFactory.create();
+            }
+            
             if (endpointName == null) {
                 endpointName = serviceFactory.getEndpointName();
             }
@@ -93,7 +100,26 @@
 
     private EndpointInfo createEndpoint() throws BusException {
         if (transportId == null) {
-            throw new NullPointerException("A transport id must be specified!");
+            if (address != null) {
+                DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
+                DestinationFactory df = dfm.getDestinationFactoryForUri(address);
+                if (df != null) {
+                    transportId = df.getTransportIds().get(0);
+                }
+            }
+            
+            if (transportId == null) {
+                // TODO: we shouldn't have to do this, but the DF is null because the
+                // LocalTransport doesn't return for the http:// uris
+                // People also seem to be supplying a null JMS address, which is worrying
+                transportId = "http://schemas.xmlsoap.org/wsdl/soap/http";
+            }
+        }
+        
+        // SOAP nonsense
+        if (bindingFactory instanceof SoapBindingInfoFactoryBean) {
+            ((SoapBindingInfoFactoryBean) bindingFactory).setTransportURI(transportId);
+            transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
         }
         
         DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
@@ -191,5 +217,12 @@
     public void setBindingFactory(AbstractBindingInfoFactoryBean bindingFactory) {
         this.bindingFactory = bindingFactory;
     }
-    
+
+    public Class getServiceClass() {
+        return serviceClass;
+    }
+
+    public void setServiceClass(Class serviceClass) {
+        this.serviceClass = serviceClass;
+    }    
 }

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?view=diff&rev=467382&r1=467381&r2=467382
==============================================================================
--- 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
Tue Oct 24 09:53:38 2006
@@ -161,7 +161,7 @@
         
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress("http://localhost/Hello");
-        svrBean.setTransportId("http://schemas.xmlsoap.org/soap/");
+        svrBean.setTransportId("http://schemas.xmlsoap.org/soap/http");
         svrBean.setServiceFactory(serviceFactory);
         svrBean.setBus(getBus());
         



Mime
View raw message