Author: dkulp Date: Tue Aug 26 08:24:50 2008 New Revision: 689109 URL: http://svn.apache.org/viewvc?rev=689109&view=rev Log: Merged revisions 688086 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk
........ r688086 | seanoc | 2008-08-22 10:12:01 -0400 (Fri, 22 Aug 2008) | 2 lines Fix for https://issues.apache.org/jira/browse/CXF-1048 wsdl2java generating incorrect portName in impl class ........ Added: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1048/ - copied from r688086, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1048/ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1048/test.wsdl - copied unchanged from r688086, cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1048/test.wsdl Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 26 08:24:50 2008 @@ -1 +1 @@ -/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914 +/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086 Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Aug 26 08:24:50 2008 @@ -1 +1 @@ -/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914 +/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086 Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java 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/generators/ImplGenerator.java?rev=689109&r1=689108&r2=689109&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java (original) +++ cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java Tue Aug 26 08:24:50 2008 @@ -74,18 +74,23 @@ JavaServiceClass service = null; String port = ""; + Iterator portIterator = null; if (!services.values().isEmpty()) { JavaServiceClass javaservice = services.values().iterator().next(); service = javaservice; - + if (javaservice.getPorts().size() != 0) { - JavaPort jport = (JavaPort)javaservice.getPorts().get(0); - port = jport.getPortName(); + portIterator = javaservice.getPorts().iterator(); } } for (Iterator iter = interfaces.keySet().iterator(); iter.hasNext();) { String interfaceName = (String)iter.next(); JavaInterface intf = interfaces.get(interfaceName); + + if (portIterator != null) { + JavaPort jport = (JavaPort)portIterator.next(); + port = jport.getPortName(); + } clearAttributes(); setAttributes("intf", intf); Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.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/server.vm?rev=689109&r1=689108&r2=689109&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm (original) +++ cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm Tue Aug 26 08:24:50 2008 @@ -40,7 +40,7 @@ System.out.println("Server ready..."); Thread.sleep(5 * 60 * 1000); - System.out.println("Server exitting"); + System.out.println("Server exiting"); System.exit(0); } } 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=689109&r1=689108&r2=689109&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 Tue Aug 26 08:24:50 2008 @@ -1022,5 +1022,24 @@ clz = classLoader.loadClass("org.apache.cxf.w2j.jaxb_custom_ext.types.Foo2"); assertEquals(1, clz.getDeclaredFields().length); } + + + @Test + public void testCXF1048() throws Exception { + + env.put(ToolConstants.CFG_COMPILE, "compile"); + env.put(ToolConstants.CFG_IMPL, ToolConstants.CFG_IMPL); + env.put(ToolConstants.CFG_OUTPUTDIR, output.getCanonicalPath()); + env.put(ToolConstants.CFG_CLASSDIR, output.getCanonicalPath() + "/classes"); + env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/cxf1048/test.wsdl")); + processor.setContext(env); + processor.execute(); + Class clz = classLoader.loadClass("org.apache.hello_world_soap_http.PingImpl"); + + WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class); + assertEquals("org.apache.hello_world_soap_http.Ping", webServiceAnn.endpointInterface()); + assertEquals("GreeterSOAPService", webServiceAnn.serviceName()); + assertEquals("PingSoapPort", webServiceAnn.portName()); + } }
