 | Level: Intermediate David Medinets (david.medinets@gmail.com), Software Consultant, Eclectic Consulting
23 Mar 2007 So far in this three-part tutorial series about the concept of WS-resources and the Web Services Resource Framework (WSRF), you've created a Person resource and learned how to use WS-Notifications with it. This final installment shows you how to look at WS-Resources from a different perspective -- that of a tangible item rather than a set of information. You'll create a Web service to control the Apache Derby database you've been using throughout this project as well as the client that treats Derby as a WS-Resource.
Objectives - Learn about the software necessary for easily creating a WS-Resource out of the Derby database, rather than its data.
- Install all of this software so that it works together.
- Create a Web service that starts and stops Derby.
- Learn how to use the Muse software package.
- Create a client that starts and stops the database
Prerequisites
This tutorial assumes that you're familiar with the basic concept of WS-Resources and with Java programming. Familiarity with Web services will help, but isn't strictly necessary.
System requirements
The two previous tutorials in this series used the binary releases of Apache's Muse project. In this tutorial, you'll use the source release, because you'll be using the very latest version of the project. You need to download the following to follow along with this tutorial:
- Apache Ant 1.6.5 -- Ant is a Java-based build tool that uses an XML-based file to control its actions. You'll use Ant to simplify the process of compiling multiple Java files and creating a Web application. It's possible to perform the steps in this tutorial without Ant, but I don't recommend it.
- Apache Derby 10.2.1.16 -- This is the database you'll be controlling.
- Java SE 5 -- This tutorial was tested using Java Platform, Standard Edition (Java SE 5), but there's nothing about it that should keep you from using Java 1.4.2.
- Apache Muse 2.1 -- This framework greatly simplifies your development, providing functionality for managing WS-Resources and a Web Services Description Language (WSDL) template that makes things easier.
- Apache Tomcat 5.5.20 -- To control the Derby WS-Resource, you'll use a Web service. This tutorial was tested using Tomcat as the Web service engine, but you should be able to use other Web service engines as well.
Note: This example should definitely not be considered production-ready code. Considerations of encryption, authorized access to data, performance, resource caching, and proper exception handling are not discussed. These aspects of Web resources are beyond the scope of this article.
Duration
Under 2 hours
Formats html, pdf
|  | |  |