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 2010/03/17 14:17:55 UTC

svn commit: r924275 - in /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory: ReflectionServiceFactoryBean.java SimpleMessages.properties

Author: dkulp
Date: Wed Mar 17 13:17:55 2010
New Revision: 924275

URL: http://svn.apache.org/viewvc?rev=924275&view=rev
Log:
Add an NPE guard and better error message

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=924275&r1=924274&r2=924275&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Wed Mar 17 13:17:55 2010
@@ -241,11 +241,11 @@ public class ReflectionServiceFactoryBea
                     try {
                         res = new URIResolver(l);
                     } catch (IOException e) {
-                        throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL", LOG), e);
+                        throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL", LOG, l), e);
                     }
 
                     if (!res.isResolved()) {
-                        throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL", LOG));
+                        throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL", LOG, l));
                     }
                     url = res.getURL();
                 }
@@ -758,6 +758,10 @@ public class ReflectionServiceFactoryBea
             }
 
             setFaultClassInfo(o, method);
+            if (o.getUnwrappedOperation() == null) {
+                throw new ServiceConstructionException(new Message("COULD_NOT_UNWRAP", LOG,
+                                                                   o.getName(), method));
+            }
             o = o.getUnwrappedOperation();
         } else if (o.isUnwrappedCapable()) {
             // remove the unwrapped operation because it will break the

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties?rev=924275&r1=924274&r2=924275&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties (original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties Wed Mar 17 13:17:55 2010
@@ -31,4 +31,6 @@ UNMAPPABLE_PORT_TYPE= Service class {0} 
 INTRACTABLE_PART= Message part {0} of Message {1} cannot be processed. This can be caused by the use of JAX-WS-specific types \
  without the JAX-WS service factory bean.
 JAXWS_ANNOTATION_FOUND=A JAX-WS Annotation was found on {0} while using the Simple frontend.  For better results, use the JAX-WS frontend.
-XSD_VALIDATION_ERROR= Error in W3C XML Schema associated with service: {0}
\ No newline at end of file
+XSD_VALIDATION_ERROR= Error in W3C XML Schema associated with service: {0}
+COULD_NOT_UNWRAP=Could not unwrap Operation {0} to match method "{1}"
+INVALID_SCHEMA_URL=Could not load schema {0}
\ No newline at end of file