Wednesday Mar 10, 2010

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.

Friday Dec 04, 2009

RESTful Web Services and EJB 3.1

First, no, I'm not dead, and I'm still at Sun. But there hasn't been that much activity with NetBeans IDE support for WS, and I've been working a lot on PHP and Cloud. I'm here though to plug Milan Kuchtiak's new DZone article, which shows how JAX-RS 1.1 can be used with EJB 3.1, taking advantage of the new EE6 Singleton EJB and the JAX-RS @ApplicationPath annotation. Check it out at DZone.
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