Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 8166 invoked from network); 20 Aug 2008 21:06:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Aug 2008 21:06:13 -0000 Received: (qmail 3972 invoked by uid 500); 20 Aug 2008 21:06:12 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 3921 invoked by uid 500); 20 Aug 2008 21:06:11 -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 3912 invoked by uid 99); 20 Aug 2008 21:06:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 14:06:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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, 20 Aug 2008 21:05:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AB1A9238896D; Wed, 20 Aug 2008 14:05:22 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r687465 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/front... Date: Wed, 20 Aug 2008 21:05:22 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080820210522.AB1A9238896D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Aug 20 14:05:21 2008 New Revision: 687465 URL: http://svn.apache.org/viewvc?rev=687465&view=rev Log: Merged revisions 687463 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r687463 | dkulp | 2008-08-20 17:00:53 -0400 (Wed, 20 Aug 2008) | 3 lines Update to try and eliminate a NPE with service creation [CXF-1756] Remove name attribute from generated impls ........ Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Aug 20 14:05:21 2008 @@ -1 +1 @@ -/cxf/trunk:686333-686363,686764,686820,687096,687387 +/cxf/trunk:686333-686363,686764,686820,687096,687387,687463 Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Aug 20 14:05:21 2008 @@ -1 +1 @@ -/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687387 +/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687387,687463 Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=687465&r1=687464&r2=687465&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original) +++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Wed Aug 20 14:05:21 2008 @@ -145,29 +145,31 @@ if (method == null || method.getReturnType().equals(Future.class) || method.getReturnType().equals(Response.class)) { - return false; + return Boolean.FALSE; } - if (method != null) { - WebMethod wm = method.getAnnotation(WebMethod.class); - if (wm != null) { - if (wm.exclude()) { - return Boolean.FALSE; - } else { - return Boolean.TRUE; - } + WebMethod wm = method.getAnnotation(WebMethod.class); + if (wm != null) { + if (wm.exclude()) { + return Boolean.FALSE; } else { - if (method.getDeclaringClass().isInterface()) { - return hasWebServiceAnnotation(method); - } - return hasWebServiceAnnotation(method); + return Boolean.TRUE; } + } + if (method.getDeclaringClass().isInterface()) { + return hasWebServiceAnnotation(method); + } + if (implInfo.getSEIClass() == null) { + return hasWebServiceAnnotation(method); } - return Boolean.FALSE; + return implInfo.getSEIClass().isAssignableFrom(method.getDeclaringClass()); } @Override public Boolean isOperation(final Method method) { + if (Object.class.equals(method.getDeclaringClass())) { + return false; + } Class implClz = implInfo.getImplementorClass(); if (isWebMethod(getDeclaredMethod(implClz, method))) { return true; @@ -190,7 +192,7 @@ } catch (SecurityException e) { throw new ServiceConstructionException(e); } catch (NoSuchMethodException e) { - return null; + return isWebMethod(method) ? method : null; } } return method; Modified: cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java?rev=687465&r1=687464&r2=687465&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java (original) +++ cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java Wed Aug 20 14:05:21 2008 @@ -271,7 +271,7 @@ File wsdlFile = outputFile("tmp.wsdl"); String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s", output.getPath(), "-frontend", "jaxws", "-client", "-server", - "org.apache.cxf.tools.fortest.GreeterImpl"}; + org.apache.cxf.tools.fortest.GreeterImpl.class.getName()}; JavaToWS.main(args); assertTrue("Failed to generate WSDL file", wsdlFile.exists()); Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?rev=687465&r1=687464&r2=687465&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm (original) +++ cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm Wed Aug 20 14:05:21 2008 @@ -34,7 +34,7 @@ * */ -@javax.jws.WebService(name = "$intf.Name", +@javax.jws.WebService( #if ($service.ServiceName != "") serviceName = "$service.ServiceName", #end Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=687465&r1=687464&r2=687465&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java (original) +++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Wed Aug 20 14:05:21 2008 @@ -94,7 +94,8 @@ Class clz = classLoader.loadClass("org.apache.cxf.cxf1678.hello_world_soap_http.GreeterImpl"); WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class); - assertEquals("Greeter", webServiceAnn.name()); + assertEquals("org.apache.cxf.cxf1678.hello_world_soap_http.Greeter", + webServiceAnn.endpointInterface()); } @Test @@ -119,7 +120,8 @@ Class clz = classLoader.loadClass("org.apache.cxf.w2j.hello_world_soap_http.GreeterImpl"); WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class); - assertEquals("Greeter", webServiceAnn.name()); + assertTrue("Impl class should note generate name property value in webService annotation", + webServiceAnn.name().equals("")); assertFalse("Impl class should generate portName property value in webService annotation", webServiceAnn.portName().equals("")); assertFalse("Impl class should generate serviceName property value in webService annotation", Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?rev=687465&r1=687464&r2=687465&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java (original) +++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java Wed Aug 20 14:05:21 2008 @@ -315,7 +315,6 @@ assertTrue("Webservice annotation wsdlLocation should begin with file", ws.wsdlLocation() .startsWith("file")); assertEquals("org.apache.cxf.w2j.hello_world_rpclit.GreeterRPCLit", ws.endpointInterface()); - assertEquals("GreeterRPCLit", ws.name()); }