0.1 Version
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
This document is intended
for the developer who wish to download and compile and
test the axis C++ server.
The following packages are
required for axis development:
TO DO ...
This document is intended for the developer who wish to download and test the axiscpp server.
Checkout axiscpp from cvs repository.
To build axisengine library
==================
When you download the source you have only Makfile.am's and configure.ac and
autogen.sh script for building.
make sure you create and set the environment variable AXISCPP_HOME
to reflect the path to the directory where you downloaded the axiscpp.
for example I have it as following
AXISCPP_HOME="/home/damitha/projects/axiscpp/c"
where c is the rood directory
for axiscpp source. There you find autogen.sh, configure.ac etc.
to build go to $AXISCPP_HOME dirctory.
sh autogen.sh
To avoid cluttering of the source with object files use the build directory
to generate your object files.
Now from c/build directory run
sh runconfigure
This will create all the Makefiles in a tree starting from build directory.
make
then
make install
this will install libaxiscpp_mod.so in c/release directory.
copy this to
Note: in $AXISCPP_HOME/include you have folder called xercesc apache1_3
apache2_0. Copy the corresponding include files into them.
To build samples
===========
Go to the samples folder
$(AXISCPP_HOME)/src/server/samples
and select the sample you want. As an example we try on
simplewebservice
type the following commands in that order
sh autogen.sh
sh runconfig
make
make install
this will install the sample library in /usr/local/apache/Axis/webservices
note: the server.wsdd file for this sample has to be put in
/usr/local/apache/Axis/conf folder.
This path is hardcoded in Axis.cpp file as following
#define WSDDFILEPATH "/usr/local/apache/Axis/conf/server.wsdd"
See Also: Test
and Samples Structure
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.
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 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.