9.11.3 Deploy and Test the Web Service Project Perform the following operations to build and deploy our Web service project: A problem arises when testing the UpdateFaculty() operation of this Web service using the tester page, which is the input parameter array fdata. As we know, fdata has a data type of ArrayList, and it […]
Build the Code to Call the UpdateFaculty() Operation – Develop Java Web Services to Access Databases
9.12.2 Build the Code to Call the UpdateFaculty() Operation Open our Window-based client project, WinClientFaculty _ UpdtDelt, and double-click on our main class, FacultyFrame.java, to open it. Click on the Design button to open the graphic user interface. In this client project, we need to use the Update button as a trigger to start the […]
BUILD A WEB-BASED CLIENT PROJECT TO CONSUME THE WEB SERVICE – Develop Java Web Services to Access Databases
9.13 BUILD A WEB-BASED CLIENT PROJECT TO CONSUME THE WEB SERVICE We can still use the Web-based client project WebClientFaculty _ Insert we built in Section 9.10 to consume our Web service to perform the faculty data updating and delete action. But we prefer to modify that project and make it our new Web-based client […]
Add Necessary Code to the FacultyProcess.jsp Page to Do Data Updating and Deleting – Develop Java Web Services to Access Databases
9.13.4 Add Necessary Code to the FacultyProcess.jsp Page to Do Data Updating and Deleting Open the FacultyProcess.jsp page under our current project WebClientFaculty _ UpdtDelt and enter the code shown in Figure 9.67 into this page to direct related actions to the related methods defined in our Java Bean class file FacultyMBean.java to perform related […]
The Organization of Web Service Operations – Develop Java Web Services to Access Databases
9.14.3 The Organization of Web Service Operations The main purpose of using our Web service is to query and manipulate data from the Course Table in our sample database. Therefore, we need to add some new operations to the Web service project. We will add five new operations based on the sequence of five operational […]
Create and Build the Web Operation QueryCourseID() 2 – Develop Java Web Services to Access Databases
H. The catch block is used to detect and display any possible exception during this connec-tion process.I. The established connection object is returned to the calling method.J. Our Web operation method, QueryCourseID(), is declared and defined with a selected faculty name as the argument. K. An ArrayList instance, result, is created, and this variable is […]
Build and Run the Web Service to Test the CourseID Query Function – Develop Java Web Services to Access Databases
9.14.4.2 Build and Run the Web Service to Test the CourseID Query Function Prior to building and running our Web Service to test its function, we need to add our Java JDBC Driver, ojdbc8.jar, that is located in the folder C:\Temp. Refer to Appendix H to get more details about downloading and installing this driver. […]
Create and Build the Web Operation InsertCourse() 2 – Develop Java Web Services to Access Databases
D. A PreparedStatement object, pstfid, is generated with a connection object, con, and query statement to get the desired faculty _ id based on the selected faculty _ name, and the latter is a positional dynamic input parameter. E. A system method, setString(), is executed to set up the input positional dynamic param-eter that is […]
Create and Build the Web Operation InsertCourse() – Develop Java Web Services to Access Databases
9.14.4.4 Create and Build the Web Operation InsertCourse() One issue to be noted to perform the new course insert action against our sample database is that we need to perform two queries for this operation, 1) query the Faculty Table to get the desired fac-ulty _ id based on the input faculty _ name, and […]
Create and Build the Web Operation UpdateCourse() 2 – Develop Java Web Services to Access Databases
A. Some local variables, such as an instance of ResultSet, rs; a blank string, fid; and an inte-ger variable, numUpdate, are declared since we need to use them to hold our query results. B. A try-catch block is used to do our first query for the Faculty Table to get a desired faculty _ id […]