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 121133 - Java CAPS Web Service can not be imported
Summary: Java CAPS Web Service can not be imported
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Quy Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-04 22:34 UTC by sebsto
Modified: 2008-03-30 21:21 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
wsdls generated by CAPS (2.26 KB, application/octet-stream)
2007-11-04 22:34 UTC, sebsto
Details
First error when importing the WSDL (40.52 KB, application/octet-stream)
2007-11-05 07:50 UTC, sebsto
Details
First error when importing the WSDL (23.85 KB, image/png)
2007-11-05 07:53 UTC, sebsto
Details
Second error when importing the WSDL (19.58 KB, image/png)
2007-11-05 07:53 UTC, sebsto
Details
Third error when importing the WSDL (15.02 KB, image/png)
2007-11-05 07:54 UTC, sebsto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sebsto 2007-11-04 22:34:19 UTC
When trying to import a WSDL generated by Java CAPS (business process exposed as a web service), 
There are two errors :

- first, the XSD schema referenced by the WSDL is not found : NB6.0b2 is looking for it in
~/.netbeans/6.0beta2/config/WebServices while it is is the same directory as the WSDL

- when copying the XSD as the place where NB6.0b2 is looking for it, we received an error message saying that the JAX-WS
service can not be created.

Creating a web service from WSDL is working OK
Adding the web service in the "Services" tab is NOT OK
Comment 1 sebsto 2007-11-04 22:34:51 UTC
Created attachment 52490 [details]
wsdls generated by CAPS
Comment 2 Roderico Cruz 2007-11-05 01:42:08 UTC
How did you import the wsdl to your project? When I imported the wsdl
(from my local file system) to the project using the External WSDL document
wizard, I did not hit this problem (wsdl and xsd file were retrieved into
the same directory).

Kindly provide exact steps to reproduce this problem.
Comment 3 sebsto 2007-11-05 07:48:14 UTC
Sorry for being vague at first
Importing the WSDL is indeed working.
Here are teh steps that are not working

- go to the "Services" tab (on the left side)
- right click on the Web Service node
- Choose "Add Web service" from the popup menu
- Choose "Loacl File" and click Browse to select my WSDL
- Click Add

First error will be 
"There was an error generating the JAX-WS model for the specified web service.  Cause:
com.sun.istack.SAXParseException2 - Unable to parse "MessageSattsu.xsd":
/Users/sst/.netbeans6.0beta1/websvc/MessageStatus.xsd (No such file or directory)"

(see attached screen shot error1.tiff

Then, I created a link to the "missing" file
marsu:~/.netbeans/6.0beta1/websvc sst$ ln -s /Users/sst/Desktop/SAL-PROTO-UC4/Deploy/bpMessagesStatus/MessageStatus.xsd 

And repeated the operation and received the error (see attached error2 screenshot)
"Unable to add specified Web Service."
Java.io.Exception - The specified WSDL file already exist. Use a local copy with a unique file name to create a client
for this web service"

I deleted ~/.netbeans/6.0beta1/websvc/SALUC4b757271744.wsdl

Then it worked with nb6.0 beta1.  I will test with beta 2 later today.





Comment 4 sebsto 2007-11-05 07:49:47 UTC
When opening the web service node created with the steps above, I received (see attached screenshot error3)
"Unable to generate JAX-WS client".  This web service client will not function for J2EE 1.5 projects.

Comment 5 sebsto 2007-11-05 07:50:42 UTC
Created attachment 52498 [details]
First error when importing the WSDL
Comment 6 sebsto 2007-11-05 07:53:03 UTC
Created attachment 52499 [details]
First error when importing the WSDL
Comment 7 sebsto 2007-11-05 07:53:29 UTC
Created attachment 52500 [details]
Second error when importing the WSDL
Comment 8 sebsto 2007-11-05 07:54:01 UTC
Created attachment 52501 [details]
Third error when importing the WSDL
Comment 9 Nam Nguyen 2007-11-05 15:47:07 UTC
Can you try (using nb 6.0 beta2) with a fresh userdir (while the IDE is not running, move ~/.netbeans/6.0beta1 to
~/.netbeans/6.0beta1-saved).
Comment 10 Roderico Cruz 2007-11-05 19:58:54 UTC
cc'ing Quy Nguyen. This is in the WebService Manager code.
Comment 11 sebsto 2007-11-05 21:03:06 UTC
Hello,

I removed my ~/.netbeans/6.0beta1 and ~/.netbeans/6.0beta2 directories
I started NB 6.0 beta 2 again

error #1 (missing xsd file) is still there
There was an error generating the JAX-WS model for the specified web service.  Cause:
com.sun.istack.SAXParseException2 - Unable to parse MessageStatus.xsd :
/Users/sst/.netbeans/6.0beta2/config/Webservices/MessageStatus.xsd (no such file or directory)


I tried to workaround with 
spirou:~ sst$ cd .netbeans/6.0beta2/config/WebServices/
spirou:~/.netbeans/6.0beta2/config/WebServices sst$ ln -s
/Users/sst/NetBeansProjects/SAL-Proto-UC4b/src/java/wsdl/SAL-PROTO-UC4/Deploy/bpMessagesStatus/SALUC4
b757271744.wsdl

Then click "Add Web Service" again and select the WSDL file
But then, I receive another error :

"Unable to add specified Web Service.
org.netbeans.modules.masterfs.filebasedfs.utils.FSException - Can not create file
SALUC4b75727144.wsdl in folder /Users/sst/.netbeans/6.0beta2/config/Webservices exists.

which kind of make sense :-(




Comment 12 sebsto 2007-11-05 21:07:28 UTC
sorry guys - I was wrong in previous entry ...
Here are the correct steps to follow :

I removed my ~/.netbeans/6.0beta1 and ~/.netbeans/6.0beta2 directories
I started NB 6.0 beta 2 again

error #1 (missing xsd file) is still there
There was an error generating the JAX-WS model for the specified web service.  Cause:
com.sun.istack.SAXParseException2 - Unable to parse MessageStatus.xsd :
/Users/sst/.netbeans/6.0beta2/config/Webservices/MessageStatus.xsd (no such file or directory)


I tried to workaround with 
spirou:~ sst$ cd .netbeans/6.0beta2/config/WebServices/
spirou:~/.netbeans/6.0beta2/config/WebServices sst$  ln -s
/Users/sst/NetBeansProjects/SAL-Proto-UC4b/src/java/wsdl/SAL-PROTO-UC4/Deploy/bpMessagesStatus/Messag
eStatus.xsd (XSD file - not WSDL as in previous comment !!!!!)


Then click "Add Web Service" again and select the WSDL file
Then I receive the error 

"Unable to generate JAX-WS client.  This web service client will nt function for J2EE 1.5 projects"

Comment 13 Quy Nguyen 2007-11-05 21:11:28 UTC
This might be a possible workaround:

1) Remove the .wsdl file from $userdir/config/WebServices
2) Copy MessageStatus.xsd to $userdir/config/WebServices
3) Change the service name to SALUC4B (with a capital 'B') in the wsdl file
4) Do the import again
Comment 14 Roderico Cruz 2007-11-05 21:39:43 UTC
The problem is that the wsdl is retrieved into the catalog directory
and then copied into the webservices dir. When this is copied, the
imported schemas are not copied.
Comment 15 sebsto 2007-11-05 21:40:37 UTC
OK.
I remove the web service from Netbeans
I checked that the $userdir/config/WebServices contains only the XSD

spirou:~/.netbeans/6.0beta2/config/WebServices sst$ ls -al
total 4
drwxr-xr-x  3 sst sst 102 Nov  5 22:32 .
drwxr-xr-x 20 sst sst 680 Nov  5 22:29 ..
lrwxr-xr-x  1 sst sst 112 Nov  5 22:04 MessageStatus.xsd ->
/Users/sst/NetBeansProjects/SAL-Proto-UC4b/src/java/wsdl/SAL-PROTO-UC4/Deploy/bpMessagesStatus/MessageStatus.xsd
spirou:~/.netbeans/6.0beta2/config/WebServices sst$ 

I changed %s/SALUC4b/SALUC4B/g in the WSDL file(except the <soap:address location=""> element)

Then imported the service again

And it works ... :-)

1. You should explain me what is the difference between SALUC4b and SALUC4B !
2. there is still a bug as the XSD file is picked up in $userdir/config/WebServices instead of the WSDl directory




  

Comment 16 Quy Nguyen 2007-11-05 23:05:18 UTC
Fixed for NB 6.0.  This fixes both the schema reference problem and the code generation problem with the wsdl service
name.  The wsdl file is no longer copied to the web services root directory; the original copy made by the xml retriever
is used to allow the schema locations to be resolved correctly.

The code generator originally used the service name (SALUC4b) to look for the service interface class, but
wsimport/wscompile generate classes with capitalization that correspond with Java conventions (e.g. SALUC4B).  This has
been corrected as well.


Checking in WebServiceManager.java;
/cvs/websvc/manager/src/org/netbeans/modules/websvc/manager/WebServiceManager.java,v  <--  WebServiceManager.java
new revision: 1.17; previous revision: 1.16
done
Checking in ui/ReflectionHelper.java;
/cvs/websvc/manager/src/org/netbeans/modules/websvc/manager/ui/ReflectionHelper.java,v  <--  ReflectionHelper.java
new revision: 1.5; previous revision: 1.4
done
Checking in codegen/WrapperClientWriter.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/codegen/WrapperClientWriter.java,v  <-- 
WrapperClientWriter.java
new revision: 1.18; previous revision: 1.17
done
Checking in consumer/DesignerWebServiceExtImpl.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/consumer/DesignerWebServiceExtImpl.java,v  <-- 
DesignerWebServiceExtImpl.java
new revision: 1.20; previous revision: 1.19
done
Comment 17 Jaroslav Pospisil 2008-03-13 15:14:19 UTC
Reporter please verify.
Comment 18 Lukas Jungmann 2008-03-30 21:21:42 UTC
treating this as verified...