This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am unable to successfully add a WS client node to my Enterprise Application Client project. I can reproduce the problem by creating a new EAC project. Then in the project pane, I right-click on the project and choose New->Web Service Client. The wizard comes up and I attach to the WS WSDL that is actively running on a Tomcat server, set my package name, and press OK. The WSDL is downloaded and written locally, but I get an error and I do NOT get a folder added to my project called "Web Service References". The error that is reported is: C:\NetBeansProjects\ApplicationClient1\nbproject\jaxws-build.xml:11: taskdef class com.sun.tools.ws.ant.WsImport cannot be found I've tried manually adding the WS libraries but that just gives me a different error (which includes a stack trace) If I repeat the above process and create a Swing Desktop client and add the Web Service client, everything works great and I can connect to the web service with no problems. I notice in the Swing app, that I get a new folder called "Web Service References" at the same level as "Source Packages" in my project. I don't get that in the enterprise app. Instead, under "Configuration Files" I get the nodes "xml-resources"->"web-service-references". But through these nodes I do not have access to the same level of functionality as in the Swing app.
What's your target server (version) for the EAR? What's the IDE version/build you use?
also what is the "different error" and what's in the stacktrace?
I'm using JBOSS 4.2.1 and with the following NB info: Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
then make sure that your JBoss installation contains JBossWS 2.0.1GA or higher (4.2.1 comes with 2.0 by default), for details see http://wiki.netbeans.org/wiki/view/JaxWsOnJBoss
Ok, we're getting much closer. Updating the jar files for JBoss helped to get rid of the errors. I can now compile my project with no errors. However, I still don't have the "Web Service References" folder as a peer to "Source Packages" in the project pane. Under "Configuration Files", I have the node "xml-resources" and then as a child to that, "web-service-references". Maybe that's how it's supposed to work with an EAC, I don't know. But when I go to my source code, you can right-click on the editor window and see a menu item "Web Services Client Resources"; that expands with a sub-menu and an item called "Call Web Service Operation". Choosing that opens the dialog, and I see my application and the Web Service correctly identified. I can expand the tree and see all of the WS methods there. However, no matter which method I select, the OK button is grayed out and I can't insert the call into my code. It is this way regardless of the source file that I try it in.
You're right, the node is missing there :(
Seems to be random, I can see the node there now, when I started the IDE with clean userdir on WinXP...
Should be fixed for 6.1.
Looks like some timing problem. The node factory doesn't listen reliably on changes in jax-ws.xml.
Fixed. Diff: http://j2ee.netbeans.org/source/browse/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/AppClientLogicalViewProvider.java?r1=1.14&r2=1.15
I've just tested that gain. The issue still hasn't been resolved. Sorry for that. I am reopening the issue again.
Not so bad. That's only hapaning when the first client is being created :-) I notice that jaxws-build.xml (ant build script) hasn't been created. Working on the fix.
Fixed. The LookupProvider was listening on nbproject FileObject that was not correct. The ChangeListener was implemented in JaxWsModel, which notifies observers when jax-ws.xml is physicaly created in nbproject directory. Diffs: http://websvc.netbeans.org/source/browse/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/project/config/JaxWsModel.java?r1=1.8&r2=1.9 http://websvc.netbeans.org/source/browse/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/project/AppClientJaxWsLookupProvider.java?r1=1.3&r2=1.4
Verified