Your opened Faculty Table is shown in Figure 9.64. It can be seen that the faculty record with the faculty _ id of B78880, which is located at row 9 and had been highlighted, has been suc-cessfully updated.
However, it is highly recommended to recover this updated faculty record to the original one to keep our database clean. Refer to Table 9.5 to perform another data update action by using the Update button on this FacultyFrame Form to recover this faculty record to the original one with the faculty name as Ying Bai. Now click on the Back button to terminate our project.
Next let’s test the faculty record delete action via our Web service operation DeleteFaculty(). Keep the faculty member Ying Bai selected in the Faculty Name combo box, and click on the Delete button to try to call our Web service operation DeleteFaculty() to delete this faculty record from our sample database.
To confirm the data delete action, two methods can be used. First you can perform a faculty data query by selecting the deleted faculty member Ying Bai from the Faculty Name combo box, and click on the Select button to try to retrieve this faculty record from our database. You can see that a Java.lang.NullPointerException occurs, which means that no matching faculty member can be found in our sample database and our data delete is successful.
Another way to confirm the data delete is to open the Faculty Table in our sample database to check whether this faculty record has been deleted.
To make our sample database clean and neat, it is highly recommended to recover this deleted fac-ulty member and related records in our Faculty, LogIn, Course and StudentCourse Tables. Refer to the original records shown in Tables 9.1~9.4 in Section 9.11.3 to complete the recovery. You may need first to run this project with the help of the Insert button to insert the deleted faculty record Ying Bai back to the Faculty Table in our sample database based on data in Table 9.1 or 9.5 and then use the Oracle SQL Developer to add other data for other Tables based on data shown in Tables 9.2~9.4 manually. As each record line is entered completely, right-click on the new added record line and select the Commit Changes item from the popup menu to add that record.
A complete Window-based client project, WinClientFaculty _ DpdtDelt, can be found in the folder Class DB Projects\Chapter 9 that is located in the Students folder at the CRC Press ftp site.
Next let’s build a Web-based client project to consume our Web service to insert a new faculty record into the Faculty Table in our sample database.