Posted by
arungupta on June 4, 2007 at 3:11 PM PDT
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.
- After you've installed
NetBeans
6 M9, download and install
GlassFish V2
b49 and configure it in the IDE Runtime tab.
- 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.
- Right-click on the newly created project, select '
New' and then 'Web
Service ...'.
-
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.
-
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:

- 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


- 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.
- 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.
- 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:
- Unable to add/edit name/type/number of parameters using the Designer
(issue#
105654)
- Default generated Web service code shows missing @param/@return javadoc
tags (issue#
105656)

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

- Edited and unsaved file status not shown (issue#
105661)
- 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