WSDL Customization Issues and Workarounds in Java EE 6 Applications in NetBeans

I've found a couple issues when using NetBeans to generate a WSDL file for an EE 6 web service, and then customizing that WSDL file. Some other users have reported them as well, so I thought I'd share them with the community.

  • When I set a new wsdlLocation attribute in the web service class, this is ignored and the default, autogenerated WSDL is used instead. It appears that GlassFish v3 doesn't recognize the wsdlLocation attribute. A bug against GlassFish has been reported (11437), there's a fix in the nightly GF builds, and the fix will be there in 3.0.1. In the meantime, it's probably worth downloading and installing the nightly GF build and registering this server in the IDE.
  • When you use NetBeans to generate the WSDL for an EE 6 JAX-WS service, generation fails because wsgen "Could not create declaration for annotation type javax.ejb.Stateless" or javax.ejb.EJB. Workaround is simply to comment out those annotations, generate WSDL, then uncomment them.

The NetBeans guys told me that the second problem is related to wsgen in JAX-WS, not an NB issue. I posted this as issue #837 in jax-ws, but the JAX-WS guys replied that this was a problem with apt, not wsgen. Their suggested workaround is to "Pass the Java EE API jar that contains @Stateless in the wsgen classpath." I don't know how this is done and am waiting to hear from the NetBeans guys, again, to find out if this is something we can do in the IDE. Also, I hope someone can explain to me what "apt" is.

UPDATE: All these issues are resolved using NB 6.9 RC, GF 3.0.1 and JDK 6 u 20.

Comments:

Hmm that's very interessting but actually i have a hard time understanding it... wonder what others have to say..

Posted by Supra Skytop on March 10, 2010 at 07:06 PM CET #

Well, I don't really understand the issues with wsgen or apt, I'm just repeating what I was told when I reported the problem.
Have you tried customizing a WSDL for an EE 6 web service using NetBeans? If you don't need to customize your WSDL, you don't need to worry about these issues.

Posted by Jeffrey Rubinoff on March 11, 2010 at 02:30 AM CET #

Looking at the post again, I see that I wrote some of it very poorly. :( I've rewritten part of it and hope it's clearer now.

Posted by Jeffrey Rubinoff on March 11, 2010 at 02:40 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I'm a technical writer for NetBeans, covering web service support.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today