Arun Gupta, Miles to go ...

Arun Gupta is a technology enthusiast, a passionate runner, and a community guy who works for Sun Microsystems.
« Previous day (Jun 3, 2007) | Main | Next day (Jun 5, 2007) »

http://blogs.sun.com/arungupta/date/20070604 Monday June 04, 2007

Tango and Web Service Designer in NetBeans 6

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:

     
    Selected:
    Unselected:

 

Technorati: wsit webservices glassfish netbeans

del.icio.us | furl | simpy | slashdot | technorati | digg |
|
« Previous day (Jun 3, 2007) | Main | Next day (Jun 5, 2007) »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.