spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / java / webservices / chap3 / 4 current pageTo page 2To page 3To page 4To page 5To page 6
[next]

Professional Java Web Services

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

Developing SOAP Services

[The following is a continuation of our series of excerpts from chapter 3 of the Wrox Press title, Professional Java Web Services. The code for the examples discussed in this excerpt can be downloaded from the Wrox Web site (free registration required).]

In this section we will dive into the details of creating a SOAP service. In this section we will discuss:

In order to illustrate some of topics discussed in the chapter we will look at parts of the Job Resumé Repository System that was introduced in the previous section.

Apache SOAP Architecture

The Apache SOAP server-side facilities allow code artifacts to be accessible from SOAP clients without the code artifacts having to be SOAP-aware. This means that no code has to be added to code artifacts to make them work with Apache SOAP. So in essence, the server-side facilities of Apache SOAP act as a bridge between SOAP clients and code artifacts. The following diagram illustrates this:

Apache SOAP Server-Side facilities

To help explain how this works let's go through the process of accessing a standard Java code artifact:

  1. The Apache SOAP run-time environment has to be configured to route requests to a particular code artifact. This is known as service registration or deployment. This is done using the command-line tool or the web-based administration tool that's provided with Apache SOAP. We discussed both methods in the Deploying and Running a "Hello World" Service section.

  2. An Apache SOAP client or another SOAP 1.1-compliant SOAP client sends an RPC-based SOAP request message to the Apache SOAP runtime. This request contains the name of the service and the name of methods to invoke.

  3. The Apache SOAP runtime validates that the service is registered and that the requested methods are marked for exposure to SOAP clients. If either validation fails, a SOAP Fault message is sent back to the SOAP client.

  4. The Apache SOAP runtime dispatches the RPC method request to the code artifact.

  5. The code artifact processes the method call and sends back a return value to the Apache SOAP run-time environment.

  6. The Apache SOAP runtime packages the return value in a SOAP response message and sends it back to the client.

Pluggable Provider Architecture

Code artifacts are supported within Apache SOAP through the Pluggable Provider architecture. This is a layer of abstraction between the Apache SOAP runtime and the components that know how to interact with the code artifacts, which are called Providers. A Provider is a Java class that is responsible for locating, loading, and invoking a code artifact. It also is responsible for packaging the return value into a SOAP Envelope when necessary. Apache SOAP provides Providers for each one of the default code artifacts. Below is a diagram of the architecture:

Apache SOAP Pluggable Provider Architecture

The architecture also provides support for User-Defined Providers; these are Providers that can be developed to handle other code artifacts. This would be useful if we had some code artifacts that we developed in a non-Java language that we wanted to make available as a service and we didn't want to invest the time or money in converting them to Java. For example, we might have some C++ classes that contain functionality that we want to make available as a service. Instead of rewriting the classes we could develop a Provider that knows how to handle C++ code artifacts. Likewise, we could write a Java Messaging Server (JMS) provider.


home / programming / java / webservices / chap3 / 4 current pageTo page 2To page 3To page 4To page 5To page 6
[next]

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Symantec Whitepaper: Converging System and Data Protection for Complete Disaster Recovery
Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
  Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Symantec Whitepaper: Comprehensive Backup and Recovery of VMware Virtual Infrastructure
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Fixing MySQL Replication · Firewall Guide: First Steps to Securing the Enterprise · VoxOx Tames the Tumultuous Communications Tangle

Created: June 5, 2002
Revised: June 5, 2002

URL: http://webreference.com/programming/java/webservices/chap3/4/