Deploy and Test the Web Service Project – Develop Java Web Services to Access Databases

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 and Run Our Client Project to Update and Delete Faculty Record via Web Service 2 – Develop Java Web Services to Access Databases

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 […]

Develop the Code to Call Our Web Service Operation DeleteFaculty() – Develop Java Web Services to Access Databases

9.13.3   Develop the Code to Call Our Web Service Operation DeleteFaculty() Open our Web-based client project WebClientFaculty _ UpdtDelt and double-click on the FacultyMBean.java in the Projects window to open this managed bean class file. Enter the code shown in Figure 9.66 into this class file to generate our Delete _ Faculty() method. Let’s have […]

BUILD JAVA WEB SERVICE PROJECT TO ACCESS COURSE TABLE IN OUR SAMPLE DATABASE – Develop Java Web Services to Access Databases

9.14  BUILD JAVA WEB SERVICE PROJECT TO ACCESS COURSE TABLE IN OUR SAMPLE DATABASE We have provided very detailed discussions and analyses on accessing and manipulating the Faculty Table in our sample database. Starting from this section, we will concentrate on access-ing and manipulating data in the Course Table in our sample database. 9.14.1  Create […]

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 […]

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() – Develop Java Web Services to Access Databases

9.14.4.3  Create and Build the Web Operation QueryCourse()Perform the following operations to add a new operation, QueryCourse(), into our Web service project to perform the course details query: 1) Double-click on our Web service main class file, WebServiceCourse.java, from the Projects window to open it.2) Click the Design button at the top of the window […]

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 […]

Create and Build the Web Operation DeleteCourse() – Develop Java Web Services to Access Databases

9.14.4.6  Create and Build the Web Operation DeleteCourse()Perform the following operations to add a new operation, DeleteCourse(), into our Web service project to perform the course delete 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 the […]


                Copyright © 2024 Saucierlight.com. All Rights Reserved.