Kesha Williams explains how to write retrieve data via web service and test the web service via a web service client.
- Let's see retrieving data…using a Soap-based web service in action.…I've opened the project in IntelliJ…and I've navigated to the interface file…for the application service.…So notice here on line 15 we have…our getAll method, and now let's look…at its implementation.…So click on ApplicationService.java,…and let's scroll down to line 45.…So here we have our getAll method.…On line 46 I'm creating an empty ArrayList.…The next few statements are enclosed in…a try-catch block to handle exceptions.…
And now on line 49, I'm getting a Database connection…and creating a statement, and on line 50,…I'm executing a simple query,…select * from tza_application,…to retrieve all the applications.…Now on lines 52 through 55,…I'm looping through the results,…creating new applications and then storing those…in the ArrayList.…And then down on line 60 I'm returning…the list of applications.…So let's test this code out by going…to ApplicationClient.java.…
So this is the application client file…we've used before.…Notice on line 25, I'm calling the getAll method…
Author
Released
1/18/2019- Comparing when to use JAX-WS vs. JAX-RS
- Using JAX-RS annotations
- Accessing REST resources with JAX-RS
- Creating JAX-WS endpoints
- Writing RESTful services using JAX-RS
- Reading, writing, updating, and deleting data via endpoints
- Mapping to entities
- Error handling
- Testing web services
- Securing Java EE web services
Skill Level Intermediate
Duration
Views
Related Courses
-
Java EE: RESTful Service with JAX-RS 2.0
with Alex Theedom2h 17m Intermediate -
WebSocket Programming with Java EE
with Alex Theedom1h 29m Intermediate
-
Introduction
-
1. Understanding Web Services
-
Web services overview4m 20s
-
Why use Java EE?1m 53s
-
Decide which service to use1m 27s
-
-
2. Building RESTful Web Services with JAX-RS
-
Understand REST services3m 6s
-
Use JAX-RS annotations4m 31s
-
Map to entities3m 42s
-
Extract request parameters3m 13s
-
Use HTTP GET4m 20s
-
Use HTTP POST2m 39s
-
Use HTTP PUT2m 8s
-
Use HTTP DELETE2m 5s
-
-
3. Accessing REST Resources with the JAX-RS Client API
-
Use the JAX-RS Client API4m 28s
-
Use advanced features2m 7s
-
4. Building SOAP Web Services with JAX-WS
-
Understand SOAP services1m 29s
-
Create a JAX-WS endpoint4m 55s
-
Create data via an endpoint2m 24s
-
Map to entities with JAXB3m 50s
-
-
5. Searching, Error Handling, and Testing in Web Services
-
Search in web services4m 56s
-
Incorporate error handling3m 45s
-
Test web services2m 45s
-
-
6. Documentation, Logging, and Tracing
-
Document web services1m 36s
-
Secure web services4m 48s
-
-
Conclusion
-
Next steps1m 51s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Retrieve data via an endpoint