Modification History:
The Web Services Node in the Services Tab provides functionality for the user to add, remove and modify Web Services references. When the WebService is added, a proxy client jar corresponding to the web services will be created and stored locally in the userdir along with other metadata that would explain about the WebService and it methods. The web services added can be later consumed by any application created by the user with simple gestures like drag and drop the WebService Node or one of its methods on to some of the project files being edited (ex. VWP designer or a JSP page). When a Web Service is added to Services Tab, the scope of the Web Service will be at the user level. This implies that each time a user starts Netbeans, the Web Services they've added will be displayed in the Services Tab.
In order to add the Web Service, in the Services Tab, user selects the context menu on the Web Services root node and then selects the Add Web Service menu item as shown in the following figure. Also before adding a Web Services, the user should also get a menu item to create a new Node group (see picture below)
![]() |
For adding the Web Service user need to provide a valid WSDL file via the pop up dialog as
Additional functionality we should provide in the dialog is an option to view the Web Service Information area (using a check box). Once the option is selected, the dialog should display the information about the Service (as shown in figure below) and its methods, so that user would get a chance to determine if they have picked up the correct Web Service.
Another useful option may be to provide an option to check for Checking WS-I Basic Profile 1.0 Compliance. If the user selects the checkbox labeled, Check WS-I Basic Profile 1.0 compliance, the WSDL parsing functionality should report warnings if the WSDL doesn't conform to the WS-I Basic Profile.
![]() |
Deleting the Web Service is using the context menu item delete in the Web Service Node. Deleting the Web Service should remove the node from the Root Node as well remove the corresponding meta data from the userdir. A confirmation dialog should be supplied to prevent accidental deletion.
Similar to deleting the web service, updating the web service is also though a context menu item update.
Once the updated WSDL is obtained, remove the old proxy client jar and replace it with the new proxy client jar. Also the corresponding metadata should be updated and the UI should reflect the changes in Web Service.
From the Web Services root node user explores each Web Service, by selecting it in the node. User further explores the Methods of the Web Service by expanding the node. Also user gets the option to view the corresponding WSDL, by right clicking on the Web Service node and select the context menu item View WSDL
![]() |
When the Web Service node is selected, the property sheet may display the following properties (see figure below)
![]() |
When the Web Service method node is selected the properties displayed may be (see figure below)
![]() |
There should be a menu option labeled, Test Method in the context menu of each method allowing the user to bring up the test dialog. The user will have an option to provide value for each of the parameters in the method, including complex reference type. The complex parameters will be shown as a tree with corresponding place for input. When the user presses the Submit} button, the results of the method call will be shown in the Method Test Results area of dialog shown in figure below
![]() |
When the Web Service is added, information about the Service will be stored as Meta Data in the userdir as follows
<userdir>/
WebServices/
GoogleSearch/
GoogleSearch.xml
GoogleSearch.wsdl
GoogleSearch.jar
GoogleSearch_dt.jar
In the example above GoogleSearch.xml contains the description about the Web Service. The GoogleSearch.jar is the proxy client created when Web Service was added. GoogleSearch_dt.jar contains the design time information specific to Visual Web Pack (See Web Service Node contracts for details on how the consumer specific meta data gets added)
The Metadata descriptor (in above example GoogleSearch.xml) contains the information about the Web Service
Ex.
<?xml version="1.0" encoding="UTF-8"?>
<ServiceType name="WebService">
<WebService name="GoogleSearch" displayName="GoogleSearch">
<Jar name="GoogleSearch.jar">
<DesignTimeJar name="GoogleSearch_dt.jar"/>
<Port name="GoogleSearchPort>
<Method name="search">
<Parameter type="">
<ReturnType type="">
</port>
</WebService>
</ServiceType>
The Web Services Root Node is added to the Services Tab, via the contract published by Services Tab. So the root node should be added via the layer file as
<folder name="UI">
<folder name="ServicesTab">
<file name="org-netbeans-modules-websvc-nodes-WebServicesRootNode.instance" />
</folder>
</folder>
| Ws_explore.jpg | ![]() |
21806 bytes |
| Ws_method_properties.jpg | ![]() |
19694 bytes |
| Ws_properties.jpg | ![]() |
14545 bytes |
| Ws_test_dialog.jpg | ![]() |
44951 bytes |
| method_parameters.png | ![]() |
10376 bytes |
| method_testresults.png | ![]() |
9488 bytes |
| new_add_ws.png | ![]() |
108251 bytes |
| webservice_addmenu.png | ![]() |
15503 bytes |