Skip to main content

Web services in NetBeans 6

Posted by arungupta on March 3, 2007 at 7:48 AM PST

I downloaded NetBeans 6.0 daily build from
The installation went pretty smooth and so after every thing was done, I started
the IDE. Before I could do anything in the IDE, an error message window popped

NPE are just plain ugly but the new feature that I noticed here
is "Review and Report Problem". So I clicked on that button and saw:

and once I clicked on "Submit Data", the error message
was submitted NetBeans and bug
shown in the default browser. Notice that the bug report has all the
fields properly filled. If you click on "View Data" then you'll see
that a complete report of current operating environment is submitted. However
the text that I entered Barring the fact that an error window popped up, I think
that is so much better experience in terms of automatically reporting the bug
back. The user does not need to be concerned about capturing the relevant
details and finding out where to file the bug etc. But the Fortunately the IDE
did not crash so I'm able to make further progress.

Then I tried to resize the NetBeans window and the Welcome
screen just kept shaking, like an earthquake effect. After I moved the middle
bar slight to the left then it disappeared. So I cleaned up .netbeans directory
and started NB 6 again to see if I'll see the shaking effect again. But this
time it worked fine. I've seen fun programs that will make your entire Windows
desktop shake but never by itself :)

Anyway, moving forward. I tried creating a Web service as
described in #ws1.
Even though I specified the parameter name as "name", the generated
operation was:

  // Web service operation


   public String sayHello(@WebParam(name = "parameter")

String parameter) {

       return null;


Notice, the generated parameter name is still the default
"parameter" instead of the non-default "name". I filed issue
and continued further. And voila, I was able to develop, deploy and
invoke a Web service on GlassFish
v2 b37
following #ws1
and #ws2
(default client only).

Then I tried creating a command-line based client and added a "Web
service client" from a WSDL URL. But no "Web service reference"
was added to the project. I filed issue
and then tried the Web-based client.

So then I created a Web client and added a "Web service client"
from a WSDL URL. And this time a "Web service reference" was added to
the project. Following rest of the steps from #ws2,
the Web service client invoked the Web service.

Technorati: NetBeans
GlassFish Web

Related Topics >>