Copyright  2001-2007 Nicholas Quaine.
Home   Basics   ServerSide   ClientSide   Demos   FAQ   Resources
ServerSide
1. Overview
2. Deploying Tomcat
3. Deploying SOAP
4. Deploying Services
Packages
Version Details
Sun Java
Tomcat
Apache SOAP
JavaMail
JAF
Xerces

Prev   1    2    3    4    Next
Server-Side SOAP
1. Overview

As is the case with any client-server paradigm, in the world of web services there are web service providers and web service consumers. Server-Side SOAP is a tutorial which deals with how to build and provide web services using Apache SOAP. We will cover the details of the technology for consuming web services when we work through SOAP on the Client-Side.

Before we get into the details of Apache SOAP let's just touch on one other major technology choice available to web service providers. It is the .NET platform from Microsoft and has the powerful advantage of allowing the service developer to incorporate any COM (Component Object Model) component into his service code. This means your service code is not limited only to the Java programming language (and any JNI extensions) but can be written in any mix of C/C++, Visual Basic, Java, C#, Fortran, COBOL, Perl etc. The .NET platform will undoubtedly be an extremely popular choice for service developers.

Apache SOAP
As far as you as a service developer are concerned, Apache SOAP is comprised of a servlet which listens for SOAP requests and the corresponding java classes necessary for translating these requests into a call to your service code (also a java class) and for translating the result of that call into a SOAP response to be sent to the client. The servlet runs on an application server. Many application servers are currently available such as BEA Weblogic, IBM Websphere and Apache Tomcat. You will be able to integrate Apache SOAP well with all of these.We will use Tomcat as the base for our example service, particularly as it is free for you to download and use and is available for a wide variety of platforms.

Below is a summary of what we will do. The whole process is broken into thirteen steps over three sections (corresponding to the next three sections of Server-Side SOAP). Finer detail on each step is included for you here to make things easier in case you ever need to refer back to the detail of any step later on. The tutorial is applicable to both Win32 and UNIX operating systems.

Deploy Tomcat

  1. Download and install Java
    • Install Java
    • Set the JAVA_HOME environment variable
  2. Download and install Tomcat
    • Create a soap directory
    • Install Tomcat
  3. Startup Tomcat and verify that it is operating correctly
    • Create a batch file to start Tomcat
    • Startup Tomcat
    • Test the sample JSPs and Servlets
Deploy the SOAP Webapp
  1. Download and install Apache SOAP
  2. Download and install libraries required by Apache SOAP
    • Install Javamail
    • Install JAF
    • Install Xerces
  3. Deploy the SOAP Webapp to Tomcat
    • Supply Tomcat with the SOAP webapp
    • Give Tomcat access to jars for SOAP and its required libraries
    • Alter the Tomcat startup to fix the order of xml parsers in the classpath
    • Bounce Tomcat
    • Check that the SOAP webapp is running
  4. Deploy one of the demo services
    • Clarifications : Services and Service Methods / What is deployment?
    • The two ways to deploy services
    • Script the deployment
    • Give Tomcat access to the sample classes
    • Bounce Tomcat
    • Run the deployment script
    • Check the deployed service on the SOAP admin page
  5. Verify that the demo service is operating correctly
    • Create a script to run the sample client
    • Run the TcpTunnelGUI to view the SOAP dialogue
Write and Deploy your own Services
  1. Develop your service classes
    • Download the Quotation Service source files
    • Create and configure a project in your preferred Java IDE
    • Understanding the important features of service code
  2. Write a Deployment Descriptor
    • Find the deployment descriptor for the Quotation Service
    • Understanding the important features of the deployment descriptor
  3. Startup Tomcat within your Java IDE
    • Set your project main class and application parameters
    • Understanding the QuotationDBInitServlet
    • Updating the server.xml config file to make Tomcat aware of the init servlet
    • Start Tomcat within the IDE
    • Some notes on debugging
  4. Deploy your services
  5. Verify that your services are operating correctly
    • Create a project for the Quotation Service clients
    • Compile and run these clients
    • Check the database persistence

Disclaimer: Before continuing, please understand that while working through this tutorial you will be instructed to download and install software on your machine. Not only has almost all of this software been developed by third parties but the peculiarities of your machine are entirely unknown to us. As such there is no way for us at Soapuser.com to foresee all of the effects that the installation of this software might have on your system. While we have made every effort to test this tutorial and avoid instructing you to download anything that might be in any way hazardous, nonetheless, we will not be held responsible for any damage. You can check the software and operating system versions we have used in our tests on the Version Details page.

[ Nicholas Quaine ]

Next

Copyright 2001-2007 Nicholas Quaine. All rights reserved.