You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/01/10 19:12:18 UTC
svn commit: r1229663 - in /cxf/trunk/rt/frontend/jaxws/src:
main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java
Author: dkulp
Date: Tue Jan 10 18:12:18 2012
New Revision: 1229663
URL: http://svn.apache.org/viewvc?rev=1229663&view=rev
Log:
[CXF-4018] Fix problems with providers not getting the proper
JAXWSMethodInvoker
Modified:
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java
Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=1229663&r1=1229662&r2=1229663&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java Tue Jan 10 18:12:18 2012
@@ -64,6 +64,7 @@ import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.endpoint.EndpointException;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.jaxws.JAXWSMethodDispatcher;
+import org.apache.cxf.jaxws.JAXWSMethodInvoker;
import org.apache.cxf.jaxws.JAXWSProviderMethodDispatcher;
import org.apache.cxf.jaxws.WrapperClassGenerator;
import org.apache.cxf.jaxws.interceptors.WebFaultOutInterceptor;
@@ -73,6 +74,8 @@ import org.apache.cxf.service.factory.Fa
import org.apache.cxf.service.factory.FactoryBeanListener.Event;
import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
import org.apache.cxf.service.factory.ServiceConstructionException;
+import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.invoker.SingletonFactory;
import org.apache.cxf.service.model.BindingInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.service.model.EndpointInfo;
@@ -691,4 +694,13 @@ public class JaxWsServiceFactoryBean ext
}
super.initializeParameter(part, rawClass, type);
}
+
+ @Override
+ protected Invoker createInvoker() {
+ Class<?> cls = getServiceClass();
+ if (cls.isInterface()) {
+ return null;
+ }
+ return new JAXWSMethodInvoker(new SingletonFactory(getServiceClass()));
+ }
}
Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java?rev=1229663&r1=1229662&r2=1229663&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java Tue Jan 10 18:12:18 2012
@@ -55,6 +55,7 @@ public class ProviderServiceFactoryTest
bean.setServiceClass(HWSoapMessageProvider.class);
Service service = bean.create();
+ assertTrue(service.getInvoker() instanceof JAXWSMethodInvoker);
assertEquals("SOAPService", service.getName().getLocalPart());
assertEquals("http://apache.org/hello_world_soap_http", service.getName().getNamespaceURI());
@@ -68,6 +69,7 @@ public class ProviderServiceFactoryTest
svrFactory.setStart(false);
ServerImpl server = (ServerImpl)svrFactory.create();
+ assertTrue(server.getEndpoint().getService().getInvoker() instanceof JAXWSMethodInvoker);
Endpoint endpoint = server.getEndpoint();
Binding binding = endpoint.getBinding();