Miles to go …

June 4, 2007

Tango and Web Service Designer in NetBeans 6

Filed under: netbeans, webservices — arungupta @ 3:11 pm

NetBeans 6 M9 was released a few weeks ago. One of the new and noteworthy features is Web Services Designer and support for WSIT. In this blog, I’ll share my experience on that support.

  1. After you’ve installed NetBeans 6 M9, download and install GlassFish V2 b49 and configure it in the IDE Runtime tab.
  2. Create a new Web project by right-clicking in Project window, selecting ‘Web‘ from the ‘Category‘ and ‘Web application‘ from ‘Projects‘. Choose the configured GlassFish instance as the Server.
  3. Right-click on the newly created project, select ‘New‘ and then ‘Web Service ...‘.
  4. Everything so far is exactly the same experience as in prior versions of the NetBeans IDE. But NetBeans 6 introduces Web Service Designer. Instead of showing the default source code view, it shows a graphical representation of Web service as shown below

    You can still see the source view by click on the ‘Source‘ tab.

  5. Once you click on ‘Add Operation‘ then it allows you add a new operation using the same same interface as in the prior versions of NetBeans IDE. Then you see the following screen

    Once the operation is added, then you see the following Design view:

    A completely expanded view of the operation is available by clicking on the multiple lines icon next to operation name and looks like:

  6. After the operation is created, right-click on the Project and select ‘Deploy Project’. The Web service gets deployed successfully to the GlassFish instance. The endpoint is hosted at ‘http://localhost:8080/WebApplication1/HelloWebServiceService?wsdl‘. Notice there are new icons that shows the sample input and output SOAP messages from the Web service. If you click on any of these icons, sample SOAP messages are shown as below

  7. Right-click on the ‘HelloWebService‘ and select ‘Test Web Service‘. This generates client-side artifacts and generates a template HTML page (as in previous NetBeans releases) to invoke the Web service.
  8. One big change from the previous versions of NetBeans is that WSIT is pre-bundled with NetBeans 6. To enable Reliable Messaging, right-click on ‘HelloWebService‘, select ‘Edit Web Service Attributes‘, select ‘Reliable Message Delivery‘, click ‘OK‘ and then deploy the endpoint again. There Web Service Designer allows to configure Reliable Messaging support but it’s non-intuitive at this moment.
  9. Invoke the endpoint again following the step#7 and you see several WS-Addressing and WS-Reliable Messaging headers in the request and response messages indicating that the endpoint is now reliable.

I tried Web services support in NetBeans 6 3 months ago and this is tremendous improvement since then. This is the first time anyway NetBeans 6 is claiming Web services support so pretty cool :) Here are few issues I filed:

  1. Unable to add/edit name/type/number of parameters using the Designer (issue# 105654)
  2. Default generated Web service code shows missing @param/@return javadoc tags (issue# 105656)

  3. Unable to add Exception to Web service in Designer (issue# 105659)

  4. Edited and unsaved file status not shown (issue# 105661)
  5. Selected/Unselected icons for MTOM, RM and Security are confusing (issue# 105665). Here is the current state of selected and un-selected icons:




Technorati: wsit webservices glassfish netbeans

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • Facebook
  • Google Bookmarks
  • DZone
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
Related posts:
  1. NetBeans 6 M10 and Web Service Designer
  2. TOTD #19: How to Add Metro Quality-of-Service to Contract-First Endpoint ?
  3. Creating and Invoking a Web service using GlassFish in NetBeans, IntelliJ, and Eclipse – Part 1
  4. Screencast #WS7: Secure and Reliable Web service using Metro/GlassFish and NetBeans IDE 6
  5. Screencast #WS3: Reliable and Interoperable Web service using WSIT plug-in, NetBeans and GlassFish


  1. [Trackback] NetBeans 6 Milestone 10 is now available. One of the new and noteworthy features is better Web services support. This entry is a follow up to an earlier post where Web services designer was tried on Milestone 9. Uninstall NetBeans…

    Comment by Arun Gupta's Blog — July 3, 2007 @ 1:14 pm

  2. How consum the web services? Please help me…

    Comment by daniel — October 20, 2007 @ 11:04 am

  3. See an example of creating and consuming the Web service at:

    Comment by Arun Gupta — October 20, 2007 @ 7:05 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress