Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 42611 invoked from network); 17 Mar 2010 13:18:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Mar 2010 13:18:16 -0000 Received: (qmail 96806 invoked by uid 500); 17 Mar 2010 13:18:16 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 96758 invoked by uid 500); 17 Mar 2010 13:18:16 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 96751 invoked by uid 99); 17 Mar 2010 13:18:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Mar 2010 13:18:16 +0000 X-ASF-Spam-Status: No, hits=-1012.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Mar 2010 13:18:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7E1E923889F1; Wed, 17 Mar 2010 13:17:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r924275 - in /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory: ReflectionServiceFactoryBean.java SimpleMessages.properties Date: Wed, 17 Mar 2010 13:17:55 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100317131755.7E1E923889F1@eris.apache.org> 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