Johan's blog
Calling WebServices with NetBeans: How Simple Can It Be?
I started working with WebServices pretty soon after the first Java Web Service Developer pack was created. Those days, you had to do a lot yourself, creating and compiling stubs, generating WSDL,...
Today, you can still do this. Actually, I still prefer the command-line approach in a number of cases. But it can be much simpler, using NetBeans. Here is what I did:
- create a new Java project
- add a Web Service Client to the project
- provide the URL of the WSDL
- in your main class, right click and select Web Service Client Resources -> Call Web Service Operation
- select the operation you want to use
- change the default parameters
- run it.
All wsimport, generation and compilation is done by NetBeans. Although I often prefer to know what exactly is going on, this approach is very good if you just have to consume a remote WebService. Actually, it is an excellent approach. It was pleasantly surprised when I found out that NetBeans allows you to call remote webservices so easily.
posted on Friday 28 Mar 2008 at 15:12
Other recent articles
