Support

Forums

Contact Me

Playing with Axis C++ and Apache 1.3.1

Here is a How to since it take me a very long time to install something which should have been trivial....
For the benefit of the community, I am publishing it here on my free time :-) ... Enjoy...

Apache Axis and Apache Axis C++ are implementation of the SOAP ("Simple Object Access Protocol") submission to W3C. From the W3C draft specification:

SOAP is a lightweight protocol for exchanging structured information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses.

Axis C/C++ (Axis CPP) is a non-Java implementation of Axis. At its core Axis CPP has a C++ runtime engine. The provided tooling allows you to create C++ client-side stubs and server-side skeletons. The server skeletons can be deployed to either a full Apache web server using the supplied apache module or a "simple_axis_server" - which is a simple HTTP listener (designed to help you test your services).


1. Download either
Apache 2.0 or Apache 1.3
unpack it to c:\apache

2. Download the latest version of Axis C++
unpack it to c:\axis

Note: try to avoid space in path, it has always been proved to be a mess under Windows.

3. Open  and add following lines at the end of Apache config file

Apache 1.3

in c:\apache\conf\http.conf
Apache 2.0

in c:\apache\conf\http.conf
LoadModule axis_module ../axis/lib/modules/mod_axis.dll
<Location /axis>
SetHandler axis
</Location>
LoadModule axis_module ../axis/lib/mod_axis2.dll
<Location /axis>
SetHandler axis
</Location>

4. Now it is starting to be interesting, both mod_axis.dll  and mod_axis2.dll have dependencies to an old dll which do no more exist since windows 98 ! msjava.dll

You need to copy from Internet msjava.dll into c:\axis\lib
You also need to copy the xerces parser xerces-c_2_2_0.dll  into c:\axis\lib

Axiss C++ required library in lib directory

5. Create a file axiscpp.conf (or search in zip distributions for a template of it) and copy it into c:\axis
Modify all path to DLL accordingly. Note that relative path or absolute path also work.

Example of  axiscpp.conf
# The comment character is '#'
#Available directives are as follows
#(Some of these directives may not be implemented yet)
#
#WSDDFilePath:The path to the server wsdd
#LogPath:The path to the axis log
#ClientLogPath:The path to the axis client log
#ClientWSDDFilePath:The path to the client wsdd
#Transport_http:The HTTP transport library
#Transport_smtp:The SMTP transport library
#XMLParser:The xml parser library
#NodeName:Node name
#ListenPort:Listening port
#Channel_HTTP:The HTTP transport channel library
#Channel_HTTP_SSL:The HTTP transport secure channel library

LogPath:c:\axis\logs\AxisLog.txt
WSDDFilePath:c:\axis\conf\server.wsdd
XMLParser:c:\axis\lib\AxisXMLParser.dll
Transport_http:c:\axis\lib\HTTPTransport.dll
Channel_HTTP:c:\axis\lib\HTTPChannel.dll
Channel_HTTP_SSL:c:\axis\lib\HTTPSSLChannel.dll

6. Go into c:/apache and create a small batch file there 

example of start script for Apache startApache.bat
SET AXIS_HOME=c:\axis
SET AXISCPP_DEPLOY=c:\axis
SET PATH=%PATH%;c:\axis\lib
SET LIB_PATH=%LIB_PATH%;c:\axis\lib

apache.exe
pause

7. create a file in c:\axis\conf\server.wsdd
Example of c:\axis\conf\server.wsdd
<?xml version="1.0" encoding="UTF-8"?>
<!-- The Entity, wspath in the following internal subset allows setting a
     path for the webservices location -->
<!DOCTYPE vars [ <!ENTITY wspath "/home/sanjaya/Axis/webservices/"> ]>

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:C="http://xml.apache.org/axis/wsdd/providers/C"
            xmlns:CPP="http://xml.apache.org/axis/wsdd/providers/CPP">
    <globalConfiguration>
    </globalConfiguration>
    <service name="transportProperties"
             provider="CPP:DOCUMENT"
             description="This is a simple test">
        <parameter name="className"
                   value="c:\axis\dll\calculator.dll"/>
        <parameter name="allowedMethods" value="add subtract"/>
    </service>
</deployment>

Use script 6.  to start Apache, if you get an exception, read it or verify DLL dependencies with DLL dependency walker


Go In a Browser and type http://localhost/axis

Axis-cpp-Working-in-apache
You might also like:
Apache POI list of Excel supported functions
38 days ago
Apache POI list of Excel supported functions
The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file
Apache POI Speed Optimizations
206 days ago
Apache POI Speed Optimizations
The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file
default thumbnail image alt
2059 days ago
Fully Time Deterministic Java
The AIAA (American Institute of Aeronautics and Astronautics) paper [.pdf] plan to use java (For c
default thumbnail image alt
2900 days ago
Open source libraries to read, write, change PDF files
iText a free Java library
2910 days ago
iText a free Java library
 iText is a library that allows you to generate PDF files on the fly. The iText classes are ver
default thumbnail image alt
3184 days ago
Apache Log4j
Log4J: A logging framework for J2EE Log4j homepage: http://jakarta.apache.org/log4j/ Reference
blog comments powered by Disqus

Donations

Thank You for supporting my work