Axis C++ Developer's Guide

0.1 Version

Table of Contents

Introduction
General Guidelines
Development Environment
Configuration Properties
Compile and Run
Adding Testcases

Writing Transport Modules
Test and Samples Structure
Adding Source Code Checks
CUnit and Axis
Debugging
 

Introduction

This document is intended for the developer who wish to download and compile and test the axis C++ server.

General Guidelines

Development Environment

The following packages are required for axis development:

Configuration Properties

TO DO ...

Compile and Run

 create and export an environment variable called
XERCES_HOME. This environment variable should contain the path to the xerces home directory.

For example if your xerces is installed in

/usr/local/xerces_c folder then
$(XERCES_HOME)/lib should expand to /usr/local/xerces_c/lib and
$(XERCES_HOME)/include should expand to /usr/local/xerces_c/include

cd axiscpp
make clean
make

If the build successful, libaxiscpp.so should have been created in
axiscpp/release directory.

Adding Testcases

See Also: Test and Samples Structure

Writing Transport Modules

Text Box: Transport ModuleText Box: APIText Box: API 

 

 

 

Axis C++ is plugged-in to any transport listener such as Apache Web Server or IIS through a Transport Module. Axis Engine and the Transport Module can be developed in 2 ways.

·        They can be compiled and linked together into a single DLL (or Shared Object) which is plugged into the Transport Listener. This way reduces one level of indirection and leads to performance.

·        They can be made 2 separate DLLs (or Shared Objects). Advantage of this method is that the 2 modules can be developed separately.

Module should be written specifically for each kind of Transport Listener (Apache or IIS) whereas the AxisEngine is not specific to Transport Listener.

So this API defines the way that Transport Module communicates with the AxisEngine.

Module side API

There is a set of functions to be implemented by each module. AxisEngine needs the module to implement them.

1.    int send_transport_information(TransportInfo*)

2.    int get_request_bytes(char*, int, int*)

3.    int send_response_bytes(char*)

send_transport_information

AxisEngine may call this function to send transport specific information of the response (Ex : http headers for HTTP transport).

get_request_bytes

AxisEngine calls this function whenever it needs more soap request bytes in the incoming stream. AxisEngine may call this function more than once.

send_response_bytes

AxisEngine calls this function whenever it wants to send a fragment of soap response to the Transport Listener. This function may also be called by the AxisEngine more than once depending on the size of the response. The transport listener may accumulate or send each fragment at each function call.

AxisEngine side API

AxisEngine has implemented following functions to be used by any Transport Module.

1.    int initialize_module()

2.    int initialize_process()

3.    int process_request(TransportInfo*)

4.    int finalize_process()

initialize_module

Transport Module MUST call this function when it loads the AxisEngine. If this function returns FAIL it cannot be assured that the AxisEngine works properly. Loading of all AxisEngine’s components (DLLs) are done within this function.

initialize_process

As the AxisEngine is single threaded model, simultaneous requests are served by several processes spawned. So when each process is spawned, its initialization should be done. Therefore the Transport Module MUST call this API function when it spawns a new AxisEngine process.

process_request

Transport Module calls this function for each soap request. Transport Module should fill a TransportInfo structure with the relevant transport information and pass it to the process_request function. Returning FAIL indicates a critical error in processing the soap request (not a generation of Soap Fault).

finalize_process

This function does the opposite of what initialize_process does and MUST be  called by Transport Module for the process end.

 

Test Structure

 

Adding Source Code Checks

 

CUnit and Axis

 

Debugging