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 184017 - Web Service Client Fails to create client
Summary: Web Service Client Fails to create client
Status: RESOLVED INCOMPLETE
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 13:15 UTC by rogerappl
Modified: 2010-04-15 16:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
wdsl file (9.38 KB, application/octet-stream)
2010-04-14 13:37 UTC, rogerappl
Details
XSD file (5.80 KB, application/octet-stream)
2010-04-14 13:38 UTC, rogerappl
Details
client jax-ws (1.48 KB, text/xml)
2010-04-15 16:29 UTC, rogerappl
Details
client jaxws build (2.34 KB, text/xml)
2010-04-15 16:30 UTC, rogerappl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rogerappl 2010-04-13 13:15:49 UTC
I have a large app that I want to expose a web service from.  The service is to execute and populate an EJB (Enterprise Application).

I created the EJBbean (Stateless) that has all the services I need.
I then went to the web app and did a create web service using the bean as an existing source.  I generated the wsdl (this has to go into the root (or it fails to be found).  I then compile and build to get the generated classes (they do not auto-generate).  Test the service (works fine).  I get generated classes under the package OK.  At this point everything is fine.

I go to the applet (I need the service to be in an applet).  I then create a new web service client.  Select the service from the project. add the package for the generated (copied code) and say OK.  I gen an error message saying the wsimport-wsclient-(service) target does not exist.  No code is generated - and nothing works.

Now I go back and generated a RESTful web service - and copy the code from the ws_client generated to the client (this works for the web service - but all my stylesheets and design disappear from the application. (something to do woth resource files as I see a master resource directory in the build that did now exist before - this makes the restful ws (which works) useless as it destroys the application.

This is consistent on window Vista, Vista x64 and windows 7 x64.  I am running NB 6.8 with the Visual Web plugin installed. (still the best!).

Also I created a web service inside the EJB container to see if I could get around this another way - now I cannot get rid of the service(s) in the list of EJBs (I looked into all the files - but these are ghosts - there must be a file somewhere that has these (outside the project environment).  They appear in the sun-web.xml as well (but not in the xml file proper)- so basically one created there is no way to get rid of a web service in the configuration.
Comment 1 Milan Kuchtiak 2010-04-14 09:30:35 UTC
> I go to the applet (I need the service to be in an applet).  I then create a
new web service client.  Select the service from the project. add the package
for the generated (copied code) and say OK.  I gen an error message saying the
wsimport-wsclient-(service) target does not exist.  No code is generated - and
nothing works.

Can you please attach the wsdl file used for this client?
What was the project type you used to create a Web Service client (you mentioned applet) ?
Comment 2 rogerappl 2010-04-14 13:37:54 UTC
Created attachment 97337 [details]
wdsl file
Comment 3 rogerappl 2010-04-14 13:38:41 UTC
Created attachment 97338 [details]
XSD file
Comment 4 rogerappl 2010-04-14 13:56:14 UTC
Attached are the two files generated when you use "generate and copy wdsl".  Also I noticed that it does not keep a location other than the root.

This is in an enterprise application (ejb and web). I have added the applet to the application (as described in the tutorial).  I have generated and deployed the application before I tried to add the service to the applet (I get the unable to download wdsl file if I do not).

If I generated the RESTful version, I can manually copy these into the applet and it seems to work OK.  But when I add the Web Service client it gives me an error - impwsclient-client-LoadDb does not exist as a target.

It seems that it does not know where to go to get the generated files - or cannot generate them - I see the generated files in the application so they are already generated (generated files jax-ws and they are in the proper directory structure)

To clarify the applet issue - I have an enterprise application that has ejbs and a web site developed in Visual Web.  I have to upload files from the client and load them into a database (several files without user intervention) as well as execute some programs on the client (this is all done through the applet).  So the applet executes the program, uploads the files to the server, then executes an ejb to move the data from the server location to the database - this is all embedded in a jsf page and when it refreshes the images are on the screen (image is selected from the database)
Comment 5 Milan Kuchtiak 2010-04-15 08:08:50 UTC
I was successful to create a Web service (in Web project) from you wsdl, then deployed this project and, then, I created a client for this web service, in standalone J2SE Application. Everything works fine for me.

Looks that the source of the problem is: 
> wsimport-client-LoadDb does not exist as a target
Is that right?

Please, check the content of client_project/nbproject folder.
That project should contain the following files:

build-impl.xml
jax-ws.xml
jaxws-build.xml

- the build-impl.xml should include jaxws-build.xml
- the jaxws-build.xml should contain the wsimport-client-XXX target, where XXX is the name of the web service (e.g. LadDb)

The best would be to attach all those files to me to understand better what had happened.

Have you trued to close and open the client project ? - It might help to generate wsimport-client-XXX target in jaxws-build.xml if this is missing.

The best approach IMO, is to create a standalone J2SE library project, create LoadDBService client in this library, then "add" this library to any project from which you want to consume the web service.
Comment 6 Milan Kuchtiak 2010-04-15 08:17:01 UTC
> The best would be to attach all those files to me to understand better what had
happened.

Sorry, I've meant: attach those file to the issue of course.
Comment 7 rogerappl 2010-04-15 16:29:17 UTC
Created attachment 97466 [details]
client jax-ws
Comment 8 rogerappl 2010-04-15 16:30:20 UTC
Created attachment 97467 [details]
client jaxws build
Comment 9 rogerappl 2010-04-15 16:58:38 UTC
I looked at the files - they seem to be OK.  The entry for the import in the build_impl.xml is missing.  In a good creation - it puts an import statement at the beginning for the jaxws_build of the file.  I have attached the files anyway.

I have also noticed that no matter where you put the files (they are created in the specified directory) the import need to have them in the root - it does not capture the directories.  I use the Project for the import.  Also - the service MUST be deployed - or it will fail.

I created another applet and left it empty - I was able to import the service just fine.  I was able to copy the generated files into the old applet and it works fine.  Just hope I do not have too many changes to make as it is time consuming - but it solves the problem for now.

Whilw I am at this - can I use the ejb container to create the web service (well - I can - but is it a good practice?)

When I start the server I also get an message:
Container com.sun.enterprise.webservice.JAXWSContainer@3285b34 doesn't support class com.sun.xml.ws.api.server.Module

I suspect that this is not an issue as it seems to work OK.

I also get this message:
DPL5306:Servlet Web Service Endpoint [L0oadDb] listening at address [http://localhost:8080/IICIS-war/L0oadDbService]

So I know the service is up and running.

Sorry - I changed the name of the service - as I cannot recreate the original.  Once I use the name - it never gets removed from the configuration (and it is not in the xml - I have looked).  this is true in the EJB services as well - so there must be a hidden file somewhere?