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 DeleteFaculty() Operation – Develop Java Web Services to Access Databases
9.12.3 Build the Code to Call the DeleteFaculty() 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 Delete button in this form as a trigger […]
Develop the Code to Call Our Web Service Operation UpdateFaculty() – Develop Java Web Services to Access Databases
9.13.2 Develop the Code to Call Our Web Service Operation UpdateFaculty() The main coding process includes two parts: generate code in the Java managed bean class FacultyMBean.java and add code into the Control class FacultyProcess.jsp page. A binding relationship between the action attribute of the Update command Button in our JSP page Faculty.jsp and the […]
Build and Run Our Client Project to Update and Delete Faculty Record via Web Service – Develop Java Web Services to Access Databases
9.13.5 Build and Run Our Client Project to Update and Delete Faculty Record via Web Service Prior to building and running our Web client project, build and deploy our Web Service project to make it ready. Click on the Clean and Build Main Project button to build our client proj-ect. If everything is fine, click […]
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() – Develop Java Web Services to Access Databases
9.14.4.1 Create and Build the Web Operation QueryCourseID()Perform the following operations to create a new operation, QueryCourseID(), in our main class file, WebServiceCourse.java:1) Double-click on our Web service class file, WebServiceCourse.java, in the folder Source Packages\org.ws.oracle in the Projects window to open it.2) Click on the Design button at the top of the window to […]
Create and Build the Web Operation QueryCourse() 2 – Develop Java Web Services to Access Databases
E. The setString() method is used to set up the actual value for the positional dynamic parameter in the query statement. F. The query is performed by calling the executeQuery() method and the query result is returned and stored in a ResultSet object, rs. G. To get more detailed information about the queried database, the […]
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 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 […]
Create and Build the Web Operation UpdateCourse() – Develop Java Web Services to Access Databases
9.14.4.5 Create and Build the Web Operation UpdateCourse() Perform the following operations to add a new operation, UpdateCourse(), into our Web service project to perform a course update query: 1) Double-click on our Web service main class file, WebServiceCourse.java, from the Projects window to open it.2) Click on the Design button at the top of […]