Java Reference
In-Depth Information
A WS application is created using a Java framework to enable a WS consumer to ma-
nipulate employee records stored in a relational database. Accessing the database from a
Web server is accomplished using JDBC technology. MySQL is the relational database
used for this example. The transport protocol for the WS is HTTP.
To avoid adding complexity to an already complicated concept, security concerns are not
considered in this example. Accessing the database from a remote machine (i.e., WS client)
without proper authentication is not a good practice; however, in this application, accessing
the database with fixed user ID and password is a matter of simplicity, not security. Further-
more, the use of the data source is much more efficient using direct JDBC calls, however, the
sample code does not follow that standard convention.
The basic Java Endpoint class does not scale well in a business computing environment, but
it is used here to allow the simplest Java environment capable of supporting a simple WS
application. In later chapters, you can apply similar programming principles and techniques
for WS programming to deploy WS applications on an Apache Tomcat or an Oracle
WebLogic server. These two servers are covered in Chapters 5 and 6, respectively.
Remember, the central idea of this chapter in terms of WS programming is how to get data
from the database through the use of WS technology, and SOAP in particular.
4.1.1 Use Case Diagram
Consider the following use case diagram for this sample application. From the perspectives
of WS clients, it invokes four operations of an employee data service. Basic data exchange
includes two major data types: employee number and employee record.
A resource can be created, read (or obtained), updated (or changed), and deleted. The concept
of CRUD has been fundamental to computer programming since the beginning of the field
computer science. We have a set of employee records stored in a database, and we want to
manipulate them from a remote machine using SOAP via WS technology.
Search WWH ::




Custom Search