Contact

Blog

Oct 29, 2009

Intro to Web Services and REST in JAVA

Dustin Talk

Dustin Talk

Default image background

Presentation given to Texas A&M CPSC 438 (Distributed Objects Programming) Students on 10/28/2009

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.

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.

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.

Contact Us

Let's talk!

We're ready to help turn your biggest challenges into your biggest advantages.

Searching for a new career?

View job openings

We value your privacy and would like to occasionally contact you about our services, thought leadership, and events that may interest you. If you consent to receive these communications, please tick the box below:

By clicking "Submit," you consent to Credera storing and processing your personal information. If you would like to withdraw your consent, please see further information, as outlined in the Europe | Asia-Pacific Privacy Notice.