Testing Web Services


NetBeans IDE has a built-in test environment for publishing web services, either for those created by you and deployed within a web application or an enterprise application, or those published externally. All you need is access to the WSDL file for this web service. You can use the Web Services Registry tool from the Web Services node in the IDE's Runtime window (shown in Figure 12-12) to register the web services in the IDE.

Figure 12-12. Web Services registry in the Runtime window


To add a web service to the registry:

  1. Right-click the Web Services node in the Runtime window and choose Add Web Service to activate the wizard.

  2. In the wizard (see Figure 12-13), enter the WSDL file (either as a URL or local file) and click the Add button.

    Figure 12-13. Add Web Service wizard

    Once you specify the file and click the Add button, the service's operations are available as nodes in the registry, and you can use the Test Operation command.

To test the Web service operation:

  1. In the Runtime window, expand the Web Services node and navigate to the node for the operation you want to test (this node should have no subnodes); right-click that node and choose Test Operation (see Figure 12-14).

    Figure 12-14. Choosing the Test Operation command on a web service in the Runtime window

  2. In the wizard that appears (see Figure 12-15), enter any input parameters for this operation and click Submit.

    Figure 12-15. The Test Web Service Operation dialog box

    The web service operation is called, and the output parameters are displayed in the Results area.



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net