cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r718640 - in /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support: JaxWsServiceConfiguration.java Messages.properties
Date Tue, 18 Nov 2008 16:11:55 GMT
Author: dkulp
Date: Tue Nov 18 08:11:53 2008
New Revision: 718640

URL: http://svn.apache.org/viewvc?rev=718640&view=rev
Log:
Add some error messages for a common Request/ResponseWrapper annotation mistake

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.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/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=718640&r1=718639&r2=718640&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Tue Nov 18 08:11:53 2008
@@ -26,6 +26,8 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.Future;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
@@ -44,6 +46,7 @@
 import javax.xml.ws.WebFault;
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.interceptor.Fault;
@@ -56,6 +59,7 @@
 import org.apache.cxf.service.model.OperationInfo;
 
 public class JaxWsServiceConfiguration extends AbstractServiceConfiguration {
+    private static final Logger LOG = LogUtils.getL7dLogger(JaxWsServiceConfiguration.class);

 
     private JaxWsImplementorInfo implInfo;
     /**
@@ -553,6 +557,12 @@
                 Class r = ClassLoaderUtils.loadClass(clsName, implInfo.getEndpointClass());
                 responseMethodClassCache.put(clsName, r);
                 responseMethodClassCache.put(selected, r);
+                
+                if (r.equals(m.getReturnType())) {
+                    LOG.log(Level.WARNING, "INVALID_RESPONSE_WRAPPER", new Object[] {clsName,
+                            m.getReturnType().getName()});
+                }
+
                 return r;
             } catch (ClassNotFoundException e) {
                 //do nothing, we will mock a schema for wrapper bean later on
@@ -617,6 +627,10 @@
                 Class r = ClassLoaderUtils.loadClass(clsName, implInfo.getEndpointClass());
                 requestMethodClassCache.put(clsName, r);
                 requestMethodClassCache.put(selected, r);
+                if (m.getParameterTypes().length == 1 && r.equals(m.getParameterTypes()[0]))
{
+                    LOG.log(Level.WARNING, "INVALID_REQUEST_WRAPPER", new Object[] {clsName,
+                            m.getParameterTypes()[0].getName()});
+                }
                 return r;
             } catch (ClassNotFoundException e) {
                 //do nothing, we will mock a schema for wrapper bean later on

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=718640&r1=718639&r2=718640&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
Tue Nov 18 08:11:53 2008
@@ -25,3 +25,5 @@
 MALFORMED_URL_IN_WEBSERVICE_ANNOTATION_EXC = Malformed url in @WebService annotation attribute
wsdlLocation.
 LOAD_WSDL_EXC = Could not load WSDL from URL {0}.
 COULD_NOT_FIND_ENDPOINT = Could not find endpoint named {0}.  Possible values are {1}.
+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. 



Mime
View raw message