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:

  1. create a new Java project
  2. add a Web Service Client to the project
  3. provide the URL of the WSDL 
  4. in your main class, right click and select Web Service Client Resources -> Call Web Service Operation
  5. select the operation you want to use
  6. change the default parameters
  7. 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
Leave a comment
No comments