cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r826181 - in /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support: JaxWsServiceFactoryBean.java Messages.properties
Date Sat, 17 Oct 2009 06:25:56 GMT
Author: cschneider
Date: Sat Oct 17 06:25:55 2009
New Revision: 826181

URL: http://svn.apache.org/viewvc?rev=826181&view=rev
Log:
CXF-2476 Throw meaningfull exception instead of NullpointerException

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/Messages.properties

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=826181&r1=826180&r2=826181&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
Sat Oct 17 06:25:55 2009
@@ -50,6 +50,7 @@
 import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
@@ -185,6 +186,10 @@
 
     @Override
     public void setServiceClass(Class<?> serviceClass) {
+        if (serviceClass == null) {
+            Message message = new Message("SERVICECLASS_MUST_BE_SET", LOG);
+            throw new ServiceConstructionException(message);
+        }
         setJaxWsImplementorInfo(new JaxWsImplementorInfo(serviceClass));
         super.setServiceClass(getJaxWsImplementorInfo().getEndpointClass());
     }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/Messages.properties?rev=826181&r1=826180&r2=826181&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/Messages.properties
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/Messages.properties
Sat Oct 17 06:25:55 2009
@@ -28,3 +28,4 @@
 SOAPBinding_MESSAGE_RPC= JAX-WS SOAPBinding annotation with Style of RPC found on method
{0}. This is not supported.
 INVALID_REQUEST_WRAPPER = @RequestWrapper class {0} is the same as the actual parameter {1}.
 This is likely not to work. 
 INVALID_RESPONSE_WRAPPER = @ResponseWrapper class {0} is the same as the actual return class
{1}.  This is likely not to work. 
+SERVICECLASS_MUST_BE_SET = serviceClass must be set to a valid service interface or class
\ No newline at end of file



Mime
View raw message