Now we have finished all code for this course update action. Let’s build and run our client project to consume our Web Service to update a selected course record on the Course Table in our sample database.
Prior to building and running our client project, make sure that our Web Service application project, WebAppCourse, has been built and deployed successfully.
Perform the following operations to build and run our client project, WebClient Course _ Update:
1) Click on the Clean and Build Main Project button to build our Web-based client project.
2) Then click on the Run Project button (green arrow) on the top to run our project.
When the course page opens, enter a valid faculty name, such as Ying Bai, into the Faculty Name box, and then click on the Select button to query all courses (course _ id) taught by this faculty member. All five courses (course _ id) should have been retrieved from our database and displayed in the CourseList box.
Now let’s test updating an existing course record, CSE-565, from the Course Table in our sample database. Keep the selected faculty member, Ying Bai, with no change, click on the course CSE-565 from the CourseList box to select it, then click on the Details button to get all details about this course. Then enter the following five pieces of information as an updated course record into the six related TextFields in this course page:
• | Course Name: | Deep Learning |
• | Schedule: | M-W-F: 2:00–2:50 PM |
• | Classroom: | TC-314 |
• | Credit: | 3 |
• | Enrollment: | 22 |
Now click on the Update button to try to update this course record from the Course Table in our sample database, CSE _ DEPT. If this update action is successful, the client page is refreshed to clean up all content in each TextField to null, as shown in Figure 9.111.

FIGURE 9.111 The run result for updating course CSE-565.

FIGURE 9.112 The confirmed course data update result.

FIGURE 9.113 The updated course CSE-565 in the Course Table.
To confirm the data update, just click on the Select button to retrieve all courses (course _ id) taught by the selected faculty member Ying Bai. Then click on the item CSE-565 from the CourseList box, and click on the Details button to get all details about this updated course. One can see that the course, CSE-565, has been updated in six TextFields, as shown in Figure 9.112.
Click on the Back and the Exit buttons to close our project.
Another way to confirm the data update is to open the Course Table via the Services window in the NetBeans IDE. The opened Course Table is shown in Figure 9.113.
One can see from the opened Course Table that the course CSE-565 is really updated in this Table, and it is located at the bottom of the Table, as shown in Figure 9.113.
Next let’s build and develop the code for our client project to access our Web Service to delete a selected course in our Course Table.