You've definitely hit a bug. Can you file a JIRA and attach the wsdl's so I don't forget about it?
Thanks! Dan On Thu March 26 2009 3:26:25 pm Tyler Wilson wrote: > Here's the new set. (I just changed the names of the porttypedef > files.) > > While I can generate the source code, it fails to compile in JBuilder > with the following errors (both using jdk 1.5 and 1.6): > > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\apache\cxf\ws\addressing > \package-info.java does not define any classes or interfaces. > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsn\b_2\ > package-info.java does not define any classes or interfaces. > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsrf\bf_ > 2\package-info.java does not define any classes or interfaces. > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsn\br_2 > \package-info.java does not define any classes or interfaces. > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsrf\r_2 > \package-info.java does not define any classes or interfaces. > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsrf\rp_ > 2\package-info.java does not define any classes or interfaces. > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > "package-info.java": Source > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsn\t_1\ > package-info.java does not define any classes or interfaces. > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > "NotificationBroker.java": > org.servicemix.wsnotification.NotificationBroker is already defined in > this compilation unit at line 15, column 1 > "CreatePullPoint.java": org.servicemix.wsnotification.CreatePullPoint is > already defined in this compilation unit at line 15, column 1 > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > "package-info.java": package annotations should be in file > package-info.java at line 1, column 1 > > -----Original Message----- > From: Daniel Kulp [mailto:[email protected]] > Sent: Thursday, March 26, 2009 12:34 PM > To: [email protected] > Cc: Tyler Wilson > Subject: Re: Apache CXF 2.0.10 WSDL2JAVA creates source that doesn't > compile > > > > The wsdl's did not survive the Apache filters. I did find them in the > pre- > moderated emails though. > > In THAT case, the issue is that the porttypedef.wsdl file defines the > porttype for: > > portType name="NotificationBroker" > > but the CreatePullPoint.wsdl is looking for: > type="wsntw:CreatePullPoint" > > Thus, the wsdl is not valid. Are you sure you have the right set of > wsdl's? > > Also, can you try with CXF 2.2? > > Dan > > On Tue March 24 2009 7:46:40 pm Tyler Wilson wrote: > > I'm using the wsdl from service mix (fuse-esb 3.4) for > > WS-Notification. > > > The two endpoints are CreatePullPoint and Broker. > > > > > > > > The first time I ran wsdl2java, it generated the stub source for each > > endpoint, but the source doesn't compile. It complains that > > > > "CreatePullPoint.java": org.servicemix.wsnotification.CreatePullPoint > > is > > > already defined in this compilation unit at line 9, column 1 > > > > > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\apache\cxf\ws\addressing > > > \package-info.java does not define any classes or interfaces. > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsn\b_2\ > > > package-info.java does not define any classes or interfaces. > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsrf\bf_ > > > 2\package-info.java does not define any classes or interfaces. > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsn\t_1\ > > > package-info.java does not define any classes or interfaces. > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsn\br_2 > > > \package-info.java does not define any classes or interfaces. > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsrf\r_2 > > > \package-info.java does not define any classes or interfaces. > > > > "NotificationBroker.java": > > org.servicemix.wsnotification.NotificationBroker is already defined in > > this compilation unit at line 9, column 1 > > > > "CreatePullPoint.java": org.servicemix.wsnotification.CreatePullPoint > > is > > > already defined in this compilation unit at line 9, column 1 > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "package-info.java": Source > > D:\TylerJProjects\WS-NotificationClient\src\org\oasis_open\docs\wsrf\rp_ > > > 2\package-info.java does not define any classes or interfaces. > > > > "NotificationBroker_HttpBinding_Client.java": cannot find symbol; > > symbol > > > : method > > > > getCurrentMessage(org.oasis_open.docs.wsn.b_2.GetCurrentMessage), > > location: class org.servicemix.wsnotification.NotificationBroker at > > line > > > 58, column 101 > > > > "NotificationBroker_HttpBinding_Client.java": notify() in > > java.lang.Object cannot be applied to > > (org.oasis_open.docs.wsn.b_2.Notify) at line 84, column 14 > > > > "NotificationBroker_HttpBinding_Client.java": cannot find symbol; > > symbol > > > : method subscribe(org.oasis_open.docs.wsn.b_2.Subscribe), location: > > > > class org.servicemix.wsnotification.NotificationBroker at line 92, > > column 85 > > > > "NotificationBroker_HttpBinding_Client.java": cannot find symbol; > > symbol > > > : method > > > > registerPublisher(org.oasis_open.docs.wsn.br_2.RegisterPublisher), > > location: class org.servicemix.wsnotification.NotificationBroker at > > line > > > 137, column 102 > > > > "package-info.java": package annotations should be in file > > package-info.java at line 1, column 1 > > > > "CreatePullPoint_HttpBinding2_Client.java": cannot find symbol; symbol > > > > : method createPullPoint(org.oasis_open.docs.wsn.b_2.CreatePullPoint), > > > > location: class org.servicemix.wsnotification.CreatePullPoint at line > > 57, column 97 > > > > > > > > (The wsdls used are attached. I'm using jdk1.5.) > > > > > > > > I copied the source from the wsdl urls and tried running wsdl2java > > again > > > on each one. Now, it fails to generate the Broker stub. > > D:\TylerJProjects\WS-NotificationClient\src>\apache-cxf-2.0.10\bin\wsdl2 > > > java.bat > > > > -client -verbose CreatePullPoint.wsdl > > > > Loading FrontEnd jaxws ... > > > > Loading DataBinding jaxb ... > > > > wsdl2java -client -verbose CreatePullPoint.wsdl > > > > wsdl2java - Apache CXF 2.0.10 > > > > > > > > > > > > WSDLToJava Error: > > > > Summary: Failures: 5, Warnings: 0 > > > > > > > > <<< ERROR! > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 14,7] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint][fault:UnableToCreatePullPointFault] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 11,7] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint][output:CreatePullPointResponse] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 8,7] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint][input:CreatePullPointRequest] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 6,5] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 4,3] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint] not e > > > > xist. > > > > > > > > > > > > > > > > org.apache.cxf.tools.common.ToolException: > > > > Summary: Failures: 5, Warnings: 0 > > > > > > > > <<< ERROR! > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 14,7] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint][fault:UnableToCreatePullPointFault] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 11,7] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint][output:CreatePullPointResponse] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 8,7] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint][input:CreatePullPointRequest] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 6,5] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint][opera > > > > tion:CreatePullPoint] not exist. > > file:/D:/TylerJProjects/WS-NotificationClient/src/CreatePullPoint.wsdl:[ > > > 4,3] > > > > Caused by > > {http://docs.oasis-open.org/wsn/bw-2}[portType:CreatePullPoint] not e > > > > xist. > > > > > > > > > > > > at > > org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL1 > > > > 1Validator.java:136) > > > > at > > org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil > > > > der.validate(JAXWSDefinitionBuilder.java:201) > > > > at > > org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuil > > > > der.validate(JAXWSDefinitionBuilder.java:61) > > > > at > > org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon > > > > tainer.java:131) > > > > at > > org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon > > > > tainer.java:231) > > > > at > > org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja > > > > va:83) > > > > at > > org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102) > > > > at > > org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171) -- Daniel Kulp [email protected] http://www.dankulp.com/blog
