Simon Lissack Simon Lissack is a developer at IDR Solutions, working on JavaFX, Android and the Cloud Conversion service.

Using Web Services Within NetBeans

1 min read

NetBeans has a bunch of convenient features which make my life as a Java developer that much simpler. Today I’ll be looking at how NetBeans allows you to add web services references into NetBeans.

How?

It’s very simple, open the services tab in NetBeans (Window > Services), there you’ll get a list of different Services such as Servers and Databases. The one we’re interested in is the “Web Services” item, right click it and press “Add Web Service…”. In the dialog box enter the the url of the descriptor file. In this example, I’m using a SOAP web service and therefore using the WSDL link. You can try this with our own web service by signing up here and using the WSDL found here. Press OK and the IDE will add it to the list and fetch the information it needs from the Web Service.

adding

Why?

Adding a Web Service to NetBeans allows for you to quickly reference it whenever you need it within a new project. As someone who works on our SaaS platform, I’m usually juggling two web services; our live service and my local instance of the server, sometimes more if I’m hunting down platform specific issues. Being able to quickly swap the two web service references allows me to cut down on some time copying and pasting the WSDL link from the browser each time I want to change it. It’s small but it all adds up.

adding_to_proj
New File > Web Service Client, select IDE Registered and press browse

Another interesting thing you can do with this, is access NetBean’s built-in testing interface. In the services tab you can right click a method associated with the web service and press “Test Method”. This allows you to input parameters and get a result from your web service without needing to write an application.

testing

This post is part of our “NetBeans article Index” series. In these articles, we aim to explore NetBeans in different ways, from useful hint and tips, to our how-to’s, experiences and usage of the NetBeans IDE.

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Simon Lissack Simon Lissack is a developer at IDR Solutions, working on JavaFX, Android and the Cloud Conversion service.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2019. All rights reserved.