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.

Wednesday Apr 01, 2009

Portability and Performance in JAX-WS Clients built in NB 6.7

In NetBeans IDE 6.7, when you create a JAX-WS client, the IDE automatically creates a local copy of the WSDL and any other WSDL or schema that the WSDL references. This improves performance, because the client does not have to look up these resources on the internet. It also improves portability, since the original WSDL file and its references do not have to be available for the client to run.[Read More]

Thursday Jun 26, 2008

WSDL 2.0 vs WADL

I've just been reading this rather interesting post on WSDL and WADL via DZone. When I got to the all-too-brief discussion of WADL at the end, I realized something: after 6 years documenting web service related stuff, I still don't really know what's going on in a WSDL document. But when I look at WADL, it seems clear as day. Is this just my naive social-science-major tech writer POV, or do WS developers feel the same way?

Wednesday Jun 25, 2008

RESTful Web Services from Database function in NB 6.5 M1

In NetBeans 6.5, in a single wizard you can create entity classes from a database and create RESTful web services from those entity classes. You used to run two wizards to do this.[Read More]

Thursday Jun 05, 2008

Intro to Facelets tutorial now available for 6.1!

If you want to use Facelets in NetBeans projects, you can now download a ZIP of the NBMs instead of checking out the project and building the NBMs yourself. In honor of this fact, I've updated the Introduction to Facelets tutorial that was written for 5.5. The new version is available here

Friday Mar 14, 2008

Axis2 plugin now available again! Also REST 0.6 and SOAP UI!

Those of you with an interest in NetBeans Axis2 support will be glad to hear that the Axis2 plugin is available again from the Update Center. Not that I've seen it there--I installed the latest "All" bundle of 6.1 development, and Axis2 support was already present. You'll also be glad to hear that libraries in the NetBeans project are now copied to the Lib folder of the AAR file. Milan is hoping to change the Axis2 feature to support remote server deployment. The way he'd like to do it would simplify Axis2 support in general. However, we don't know if this will be done in time for the release... REST 0.6 and SOAP UI are also now supported. More about them later, after I've had a chance to investigate further.

Friday Feb 08, 2008

REST 0.5 is out

As you may know, the version 0.5 RESTful Web Services plugin for NetBeans IDE has been available since 18 January. I've already updated the snippets in relevant tutorials. The most visible changes in the API are:
  • Replacement of the @UriTemplate annotation with the simpler @Path.
  • The @HttpMethod annotation has become a meta-annotation, with the following changes:
    • @HttpMethod("GET")-->@GET
    • @HttpMethod("POST")-->@POST
    • @HttpMethod("PUT")-->@PUT
The deployment and complilation processes have also been simplified. For more details, see Paul Sandoz's blog. Releases of Jersey and the NetBeans REST plugin are related to the JAX-RS release schedule. The Jersey release schedule is available here.

Tuesday Feb 05, 2008

New Tutorial Exposing MySQL DB

There's a new web services tutorial up, based on a demo posted on Arun Gupta's excellent blog. This tutorial shows you how to set up NetBeans IDE to access a MySQL database and then expose database fields as RESTful web services, via entity classes. The tutorial is called Consuming a MySQL Database in a RESTful Web Service. It makes a good follow-on to Connecting to a MySQL Database and Getting Started with RESTful Web Services on GlassFish.

Thursday Jan 31, 2008

Community Contributions

My team members are starting to link relevant community contributions from our documentation index pages. If you look at the web services documentation home page, you'll see the new category Community Contributions with the very first contribution, Kristian Rink's Web Services with NetBeans (for Eclipse users). This is the first part of what I hope will be a series about how much better it is to develop web services with our IDE instead of someone else's. Anyway, if you think of any cool demonstrations of developing web services on NetBeans IDE, do please post to

New REST on Tomcat tutorial

Good news for those of you who have struggled trying to deploy the Getting Started with RESTful Web Services tutorial on the bundled Tomcat AS. No more digging about on netbeans wiki. I've combined the configuration instructions on the wiki with the existing tutorial, and created the new Getting Started with RESTful Web Services on Tomcat tutorial. The original tutorial is now titled Getting Started with RESTful Web Services on GlassFish.

We've been having some trouble building the new tutorial's project on linux boxes. These problems are related to known issues about library definitions on linux (Issues 126339 and 115947 for those of you in the NetBeans IDE community). If you have a linux box and use this tutorial, please let us know how it went.

For that matter, any and all feedback would be welcome!


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


« April 2014