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.

Bug 124270 - Missing Web Service Client node in AppClient
Summary: Missing Web Service Client node in AppClient
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Client (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2007-12-19 15:09 UTC by rdclawson
Modified: 2008-01-30 11:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rdclawson 2007-12-19 15:09:34 UTC
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.
Comment 1 Lukas Jungmann 2007-12-19 15:17:35 UTC
What's your target server (version) for the EAR? What's the IDE version/build you use?
Comment 2 Lukas Jungmann 2007-12-19 15:18:28 UTC
also what is the "different error" and what's in the stacktrace?
Comment 3 rdclawson 2007-12-19 15:21:25 UTC
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)
Comment 4 Lukas Jungmann 2007-12-19 15:56:13 UTC
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
Comment 5 rdclawson 2007-12-19 16:55:43 UTC
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.
Comment 6 Lukas Jungmann 2007-12-20 12:41:22 UTC
You're right, the node is missing there :(
Comment 7 Lukas Jungmann 2007-12-20 13:56:35 UTC
Seems to be random, I can see the node there now, when I started the IDE with clean userdir on WinXP...
Comment 8 Milan Kuchtiak 2008-01-16 15:43:04 UTC
Should be fixed for 6.1.
Comment 9 Milan Kuchtiak 2008-01-23 16:29:42 UTC
Looks like some timing problem.
The node factory doesn't listen reliably on changes in jax-ws.xml.
Comment 11 Milan Kuchtiak 2008-01-24 16:24:39 UTC
I've just tested that gain.
The issue still hasn't been resolved.
Sorry for that. I am reopening the issue again.
Comment 12 Milan Kuchtiak 2008-01-24 16:47:03 UTC
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.
Comment 13 Milan Kuchtiak 2008-01-25 18:16:12 UTC
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

Comment 14 Jaroslav Pospisil 2008-01-30 11:51:57 UTC
Verified