bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Programming WebLogic Web Services

Architectural Overview

The following sections provide an overview of WebLogic Web services architecture and three types of WebLogic Web service operations:

- WebLogic Web Services Architecture

- Backend Component-Only Operation

- Backend Component and SOAP Message Handler Chain Operation

- SOAP Message Handler Chain-Only Operation

WebLogic Web Services Architecture

You develop a WebLogic Web service, by using standard J2EE components, such as stateless session EJBs, and Java classes. Because WebLogic Web services are based on the J2EE platform, they automatically inherit all the standard J2EE benefits, such as a simple and familiar component-based development model, scalability, support for transactions, life-cycle management, easy access to existing enterprise systems through the use of J2EE APIs (such as JDBC and JTA), and a simple and unified security model.

A single WebLogic Web service consists of one or more operations; you can implement each operation using different backend components and SOAP message handlers. For example, an operation might be implemented with a single method of a stateless session EJB or with a combination of SOAP message handlers and a method of a stateless session EJB.

Backend Component-Only Operation

The following figure describes the architecture of a WebLogic Web service operation that is implemented with only a backend component, such as a method of a stateless session EJB.

Figure 2-1 WebLogic Web Service with Backend Component

Here's what happens when a client application invokes this type of WebLogic Web service operation:

1. The client application sends a SOAP message request to WebLogic Server over HTTP. Based on the URI in the request, WebLogic Server identifies the Web service being invoked.

2. The Web service reads the SOAP message request and identifies the operation that it needs to run. The operation corresponds to an invoke of a method of a stateless session EJB or a Java class.

3. The Web service converts the operation's parameters in the SOAP message from their XML representation to their Java representation using the appropriate deserializer class. The deserializer class is either one provided by WebLogic Server for built-in data types or a user-created one for non-built-in data types.

4. The Web service invokes the appropriate backend component method, passing it the Java parameters.

5. The Web service converts the method's return value from Java to XML using the appropriate serializer class, and packages it into a SOAP message response.

6. The Web service sends the SOAP message response back to the client application that invoked the Web service.

Backend Component and SOAP Message Handler Chain Operation

The following figure describes a WebLogic Web service operation that is implemented with both a SOAP message handler chain and a backend component.

Figure 2-2 WebLogic Web Service Operation With Backend Component and SOAP Message Handler Chain

Here's what happens when a client application invokes this type of WebLogic Web service operation:

1. The client application sends a SOAP message request to WebLogic Server over HTTP. Based on the URI in the request, WebLogic Server identifies the Web service being invoked.

2. The Web service reads the SOAP message request and identifies the operation that it needs to run. The operation in this case corresponds to an invoke of a SOAP message handler chain followed by an invoke of a method of a stateless session EJB or a Java class.

3. The Web service invokes the appropriate handler chain. The handler chain accesses the contents of the SOAP message request, possibly changing it in some way.

4. The Web service converts the operation's parameters in the [possibly modified] SOAP message from their XML representation to their Java representation using the appropriate deserializer class. The deserializer class is either one provided by WebLogic Server for built-in data types or a user-created one for non-built-in data types.

5. The Web service invokes the appropriate backend component method, passing it the Java parameters.

6. The Web service converts the method's return value from Java to XML using the appropriate serializer class, and packages it into a SOAP message response.

7. The Web service invokes the appropriate SOAP message handler chain. The handler chain accesses the contents of the SOAP message response, possibly changing it in some way.

8. The Web service sends the [possibly modified] SOAP message response back to the client application that invoked the Web service.

SOAP Message Handler Chain-Only Operation

The following figure describes the architecture of a WebLogic Web service operation that is implemented with only a SOAP message handler chain.

Figure 2-3 WebLogic Web Service Operation with SOAP Message Handler Chain Only

Here's what happens when a client application invokes this type of WebLogic Web service operation:

1. The client application sends a SOAP message request to WebLogic Server over HTTP. Based on the URI in the request, WebLogic Server identifies the Web service being invoked.

2. The Web service reads the SOAP message request and identifies the operation that it needs to run. The operation in this case corresponds to an invoke of a SOAP message handler chain.

3. The Web service invokes the appropriate handler chain. The handler chain accesses the contents of the SOAP message request, possibly changing it in some way.

4. The Web service invokes the appropriate handler chain. The handler chain creates the SOAP message response.

5. The Web service sends the SOAP message response back to the client application that invoked the Web service.