Java Reference
In-Depth Information
4 A Sample Web
Service Application
Objectives
After completing this chapter, you should be able to:
1. Write a Web Service that provides access to employee records stored in a
relational database
2.
Write a Web Service using JDK 6 or above
3.
Publish a Web Service using basic Java Endpoint class
4.
Test a Web Service with SOAPUI testing tool
5.
Use wsimport to generate a Web Service stub for the client
6.
Write a simple Web Service consumer to invoke a Web Service
4.1 A Sample application
Welcome to the world of Web Services! You may find this chapter technically challenging at
first; however, as you work your way through the examples, you will find that the same
patterns are used repeatedly throughout. If you think of writing Web Services as similar to
writing any other Java class, that may help to ease any anxiety about the difficulty of this
task.
In this application, we deploy a simple SOAP server using basic Java JDK delivery. In order
to make this application work, you will need the following software packages that can be
downloaded from the Internet (more instructions are included in Appendix A).
Java JDK 6
MySQL Community Server 5.6
MySQL Employees sample database
MySQL JDBC driver
Search WWH ::




Custom Search