Introduction:
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.
Demo Applications:
As part of the presentation linked above, several demonstrations were given including overviews of the following projects and technologies.
-
metroSOAP
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. -
jerseyRest
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.
Optional Resources:
These resources are indirectly used in the demonstration of the above projects and may be necessary to recreate the given scenarios.
-
soapUI project
Project files for SOAP UI. Import as necessary. -
database table
A collection of famous texas quotes returned by our service calls. May be imported into a mysql table.
Required Software:
A collection of software to build and deploy our example applications.
-
Java JDK 6.0 (Update 16)
http://java.sun.com/javase/downloads/index.jsp -
Eclipse IDE for Java EE Developers
http://eclipse.org/downloads/ -
Apache Tomcat Server 6.x
http://tomcat.apache.org/download-60.cgi -
MySQL Community Server
http://dev.mysql.com/downloads/mysql/5.1.html
Optional Software:
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)
http://www.soapui.org/ -
wadl2java (A tool once added to SoapUI will generate a Java Client from our REST Service)
http://wadl.dev.java.net/wadl2java.html -
JAX-WS (A tool once added to SoapUI will generate a Java Client from our SOAP Web Service)
http://jax-ws.dev.java.net/
License:
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.


Discussion
No comments yet.