Book Image

Service Oriented Java Business Integration

Book Image

Service Oriented Java Business Integration

Overview of this book

Table of Contents (23 chapters)
Service Oriented Java Business Integration
Credits
About the Author
Acknowledgement
About the Reviewers
Preface

Your First JBI Sample—Binding an External HTTP Service


I hope all readers, whether novice or professional, can understand and appreciate what we mean by saying a HTTP service, otherwise most probably they will not be reading a text book like this. Hence, I will choose a HTTP service for demonstration purposes here.

Servlet-based HTTP Service

A HTTP service is a network service accessible through the HTTP protocol. Servlets are the simplest components available in Java with which we can build HTTP service, and hence we will use that here. Assuming that the reader is familiar with servlets and how to deploy a HTTP service in their favorite web container such as Tomcat, only the major steps are listed here. For further details the reader is encouraged to refer to any available servlet technology books.

As the first step, we will build and deploy a very simple servlet. The servlet code is given as follows:

public class WelcomeServlet extends HttpServlet
{
public static final String XML_CONTENT...