Presentation given to Texas A&M CPSC 438 (Distributed Objects Programming) Students on 10/28/2009
From a technical standpoint, building a Web Service is not entirely difficult, but it’s not a task that should be taken lightly either. Given the vast use of Web Services in the Enterprise environment, on a recent trip to Texas A&M University, I was able to speak to students (courtesy of Dr. Salih Yurttas) about Web Services and REST in JAVA.
As part of the presentation linked above, several demonstrations were given including overviews of the following projects and technologies.
We create a simple java object (POJO) representing a saying about Texas and it’s author. Using the Hibernate framework, we create a mapping to a mysql table for this object as well as a data access object for accessing the objects. Creating a service class, and it’s implementation, we annotate the service as necessary to produce a RPC based SOAP Web Service Web Application that is factored into a war file for deployment on a Java Web App server such as Apache Tomcat.
Using the same POJO, Hibernate mapping, and DAO as the previous project, we expose a resource and annotate it as necessary to produce a RESTful Web Service.
These resources are indirectly used in the demonstration of the above projects and may be necessary to recreate the given scenarios.
Project files for SOAP UI. Import as necessary.
A collection of famous texas quotes returned by our service calls. May be imported into a mysql table.
A collection of software to build and deploy our example applications.
Java JDK 6.0 (Update 16)
Eclipse IDE for Java EE Developers
Apache Tomcat Server 6.x
MySQL Community Server
Additional resources to test and access the Web Services in a meaningful way. I am also including references to tools that once added to SOAP UI will allow for JAVA client code generation.
SoapUI (For accessing our services)
wadl2java (A tool once added to SoapUI will generate a Java Client from our REST Service)
JAX-WS (A tool once added to SoapUI will generate a Java Client from our SOAP Web Service)
This article, along with any associated source code and files, is licensed under Apache License, Version 2.0
about the author:
Dustin Talk is a consultant at Credera. He graduated from Texas A&M University with his Masters of Computer Science, B.S. in Computer Science, and a minor in Business. Throughout his academic career he developed applications using Java and .Net technologies. While in school, he worked for The Department of Statistics as a Network Administrator. He has interned for Anheuser-Busch Inc. as a Systems Engineer developing in .Net and working with industrial software.