From the course: Java EE 7: Web Services
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Delete data via an endpoint - Java EE Tutorial
From the course: Java EE 7: Web Services
Delete data via an endpoint
- [Instructor] Let's look at deleting data using a SOAP-based web service. I've opened the project in IntelliJ and I've navigated to the interface file for the application service. Notice down on line 27, the definition for our deleteApplication method and notice we're passing in an id of the application that we want to delete. So, let's navigate to the ApplicationService file and on line 102 notice the implementation for our deleteApplication. So, on line 104, I'm getting a connection and creating a statement. On line 105, I'm calling the executeUpdate on that statement and notice I'm passing in a delete SQL statement, so DELETE FROM TZA_APPLICATION where the id matches the id that's passed in. I'm handling generic exceptions here on line 107 which will return false. Now, if all goes well and we're able to delete the application, I am returning true. So, here we've navigated to the ApplicationClient file and if we scroll down to line 37, notice we are calling the deleteApplication on…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Understand SOAP services1m 29s
-
(Locked)
Create a JAX-WS endpoint4m 55s
-
(Locked)
Implement SOAP clients in Java4m 8s
-
(Locked)
Retrieve data via an endpoint3m 25s
-
(Locked)
Create data via an endpoint2m 24s
-
(Locked)
Update data via an endpoint2m 6s
-
(Locked)
Delete data via an endpoint2m
-
(Locked)
Map to entities with JAXB3m 50s
-
(Locked)
-
-
-