ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ros...@apache.org
Subject cvs commit: ws-site/targets/axis/cpp windev-guide.html windev-guide.pdf winuser-guide.html winuser-guide.pdf
Date Thu, 27 May 2004 10:22:47 GMT
roshan      2004/05/27 03:22:47

  Modified:    targets/axis/cpp windev-guide.html windev-guide.pdf
                        winuser-guide.html winuser-guide.pdf
  Log:
  Added transport and parser layer descriptions to the documentation
  
  Revision  Changes    Path
  1.8       +59 -33    ws-site/targets/axis/cpp/windev-guide.html
  
  Index: windev-guide.html
  ===================================================================
  RCS file: /home/cvs/ws-site/targets/axis/cpp/windev-guide.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- windev-guide.html	19 Apr 2004 08:18:54 -0000	1.7
  +++ windev-guide.html	27 May 2004 10:22:46 -0000	1.8
  @@ -168,7 +168,7 @@
   <span class="menuLabel">Axis (C++)</span>
     
   <div class="menuItem">
  -<a href="../cpp/index.html">Axis C++ 1.1 released!</a>
  +<a href="../cpp/index.html">Latest Axis C++ Release!</a>
   </div>
     
   <div class="menuItem">
  @@ -180,6 +180,10 @@
   </div>
     
   <div class="menuItem">
  +<a href="http://nagoya.apache.org/wiki/apachewiki.cgi?AxisCPPProjectPages">Wiki Pages</a>
  +</div>
  +  
  +<div class="menuItem">
   <a href="../cpp/who.html">Who we are</a>
   </div>
     
  @@ -266,7 +270,7 @@
   <h3>Axis C++ Windows Developers Guide</h3>
   </div>
   <p>
  -<a href="#buildaxis">BUILDING AND DEPLOYING AXIS C++</a>
  +<a href="#buildaxis">Building and Deploying Axis C++</a>
   <br>
   <a href="#cvscheckout">Getting a cvs checkout</a>
   <br>
  @@ -278,7 +282,7 @@
   <br>
   <a href="#deployaxis">Deploying Axis in Apache</a>
   <br>
  -<a href="#deploywebservice">DEPLOYING A WEB SERVICE IN AXIS C++</a>
  +<a href="#deploywebservice">Deploying a web service in Axis C++</a>
   <br> 
   <a href="#generatefiles">Generating Serverside Skeletons/ wrappers and client side
stubs</a>
   <br> 
  @@ -292,12 +296,13 @@
   <br>
   <a href="#providedclients">Building and deploying the provided interop client applications</a>
   <br>
  -<a href="#consumews">CONSUMING THE WEB SERVICE WITH AXIS C++ CLIENT</a>
  +<a href="#consumews">Consuming the web service with Axis C++ client</a>
   <br> 
   <a href="#runclient">Coding and Running the client</a>
   <br>
  +<a href="#transport">Creating and Building your own transport layer</a>
   <br>
  -<a href="#usingxerces">BUILDING AXIS C++ WITH THE XERCES PARSER</a>
  +<a href="#parser">Creating and Building your own parser</a>
   </p>
   <p>
   <a name="buildaxis"></a>
  @@ -344,7 +349,7 @@
   <a name="installapacheexpat"></a>
   </p>
   <div class="h4">
  -<h4>Installing Apache and EXpat</h4>
  +<h4>Installing Apache and Expat</h4>
   </div>
   <br>
   <p>
  @@ -390,6 +395,21 @@
   <br>(From here onwards we will refer to these modules as APACHE_MODULE. Replace it
with the correct module for the Apache server version that you have installed)<br>
   <br>&nbsp;</p>
   <p>
  +<strong>Axis Transport Library</strong>
  +</p>
  +<p>In VC++ distribution workspace build AxisTransport project.Then AxisTransport.dll
will be built.</p>
  +<p>
  +<strong>Xerces Parser Library</strong>
  +</p>
  +<p>In VC++ distribution workspace build AxisXMLParserXerces project. Then AxisXMLParserXerces.dll
will be built.</p>
  +<p>
  +<strong>Expat Parser Library</strong>
  +</p>
  +<p>In VC++ distribution workspace build AxisXMLParserExpat project. Then AxisXMLParserExpat.dll
will be built</p>
  +<p>
  +<strong>Building AxisTransport.dll and AxisXMLParser.dll</strong>
  +<br>Build the AxisTransport and AxisXMLParser projects,Which will build the AxisTransport.dll
and AxisXMLParser.dll and also AxisTransport.lib and AxisXMLParser.lib in [CHECKOUT_HOME]\c\bin.</p>
  +<p>
   <strong>Building the AxisServer and AxisClient dlls</strong>
   </p>
   <p>Similarly as you built the Apache modules, build the AxisServer and AxisClient
projects, Which will build the AxisServer.dll and AxisClient.dll and also AxisServer.lib and
AxisClient.lib in [CHECKOUT_HOME]\c\bin.</p>
  @@ -402,17 +422,22 @@
   <p>1) Create a directory structure called "Axis" inside [APACHE_HOME] as follows.<br>(Instead,
you can copy the folder [CHECKOUT_HOME]\c\deploy [APACHE_HOME] and rename it to "Axis" and
you will find some of the files that you are asked to create in this guide, already existing
in that folder)<br>
   <br>Axis<br>|__ libs ( Copy [EXPAT_EXTRACT]\Libs\libexpat.dll and paste it
inside)<br>|__ logs (log files are located here)<br>|__ conf (server.wsdd file
is located here)<br>|__ webservices (The place to put webservice dlls)<br>|__
wsdls (The directory for the wsdl files of the deployed web services)<br>
   <br>2)Set an environment variable named AXIS_HOME and give [APACHE_HOME]\Axis as
the value.<br>
  -<br>i)You will find AxisServer.dll and APACHE_MODULE in [CHECKOUT_HOME]\c\bin directory.<br>ii)Copy
APACHE_MODULE to [APACHE_HOME]\modules directory of your apache installation.<br>iii)Copy
AxisServer.dll to any location specified by your PATH environment variable</p>
  +<br>i)You will find AxisServer.dll and APACHE_MODULE in [CHECKOUT_HOME]\c\bin directory.<br>ii)Copy
APACHE_MODULE to [APACHE_HOME]\modules directory of your apache installation.<br>iii)Copy
AxisServer.dll to any location specified by your PATH environment variable<br>iv)Copy
AxisTransport.dll to any location specified by your PATH environment variable<br>v)Copy
AxisXMLParser.dll to any location specified by your PATH environment variable</p>
   <p>
  -<strong>NOTE:</strong>Usually it is a best practice to copy AxisServer.dll
to [AXIS_HOME]\libs\ directory and add that directory to your PATH environment variable.<br>
  +<strong>NOTE:</strong>Usually it is a best practice to copy AxisServer.dll,AxisTransport.dll
and AxisXMLParser.dll to [AXIS_HOME]\libs\ directory and add that directory to your PATH environment
variable.<br>
   <br>2) Set the "PATH" environment variable to the following directories.<br>[APACHE_HOME]<br>[APACHE_HOME]\Axis\libs<br>
   <br> 3) Change the apache configuration file [APACHE_HOME]\conf\httpd.conf to include
the following lines at the bottom.<br>
   <br>LoadModule axis_module modules/APACHE_MODULE<br>&lt;Location /axis&gt;<br>SetHandler
axis<br>&lt;/Location&gt;<br>
   <br>4)create a file in [APACHE_HOME]\Axis named "axiscpp.conf" which should contain
the following lines.<br>
  -<br>AXISLOGPATH:XXXX<br>WSDDFILEPATH:YYYY<br>
  -<br>Where XXXX will be the path to a file named AxisLog (The log file)and YYYY will
be the path to the server.wsdd file.<br>
  -<br>i.e.<br>AXISLOGPATH: [APACHE_HOME]\Axis\logs\AxisLog.log<br>WSDDFILEPATH:
[APACHE_HOME]\Axis\conf\server.wsdd<br>
  -<br>6)Select start-&gt;programs-&gt;Apache HTTP server-&gt;Control Apache
Server-&gt;stop to stop the apache server<br>(This is because apache will be started
automatically by the installation program)<br>
  +<br>AXISLOGPATH:XXXX<br>WSDDFILEPATH:YYYY<br>AXISTRANSPORT_HTTP:ZZZZ<br>AXISXMLPARSER:WWWW<br>
  +<br>Where XXXX will be the path to a file named AxisLog (The log file)and YYYY will
be the path to the server.wsdd file.ZZZZ will be the path to AxisTransport.dll if it's a HTTP(if
the selected transport is SMTP then should give that path.WWWW will be the path to AxisXMLParser.dll<br>
  +<br>i.e.<br>AXISLOGPATH:[APACHE_HOME]\Axis\logs\AxisLog.log<br>WSDDFILEPATH:[APACHE_HOME]\Axis\conf\server.wsdd<br>AXISTRANSPORT_HTTP:[APACHE_HOME]\Axis\libs\AxisTransport.dll<br>AXISXMLPARSER:[APACHE_HOME]\Axis\libs\AxisXMLParser.dll<br>
  +</p>
  +<p>
  +<strong>Note:If the AxisTransport.dll and AxisXMLParser.dll paths are not given in
axiscpp.conf then the hardcoded values will be used.For that set the path of these 2 in the
PATH environment variable or copy them to the same location as the Client.exe.</strong>
  +</p>
  +<br>
  +<p>6)Select start-&gt;programs-&gt;Apache HTTP server-&gt;Control Apache
Server-&gt;stop to stop the apache server<br>(This is because apache will be started
automatically by the installation program)<br>
   <br>Open up a DOS terminal and give the command "apache -k start" to start apache
(If Apache 2.0 server does not seem to respond when started this way, try "apache -X").<br>open
a browser and verify whether you can browse http://localhost/ (or give the machines ip as
http://xxx.xxx.xxx.xxx/). If apache is running you will see the Apache start page in the browser.&nbsp;</p>
   <p>
   <a name="deploywebservice"></a>
  @@ -531,7 +556,7 @@
   </p>
   <p>7) In the dialog that appears select &ldquo;An empty project&rdquo; click
&ldquo;Finish&rdquo; and then &ldquo;OK&rdquo;.<br>8) Right click on
the project that you created (i.e. ws1) and click &ldquo;Add Files to Project&hellip;&rdquo;
on the menu that appears.Then Add the generated .cpp and .h files from the [SKELSTUB_HOME]\ClientOut
to the project and click &ldquo;OK&rdquo;.<br>9) Right click on the project
(i.e. calclient) again and click on &ldquo;Settings&hellip;&rdquo; on the menu
that appears. Click the &ldquo;C/C++&rdquo; tab and select &ldquo;Preprocessor&rdquo;
from the &ldquo;Category&rdquo; Drop down list.<br>In the &ldquo;Additional
include directories&rdquo; give [CHECKOUT_HOME]c\include as the include path.<br>
   </p>
  -<p>10) Click the &ldquo;Link&rdquo; tab and select &ldquo;Input&rdquo;
from the &ldquo;Category&rdquo; Drop down list.<br>Add AxisClient.lib to the
&ldquo;Object/library modules&rdquo; and in the &ldquo;Additional library path&rdquo;
give the path. AxisClient.lib can be found in [CHECKOUT_HOME]\c\bin once you build the AxisClient
project of the "Distribution" VC workspace.<br>
  +<p>10) Click the &ldquo;Link&rdquo; tab and select &ldquo;Input&rdquo;
from the &ldquo;Category&rdquo; Drop down list.<br>Add AxisClient.lib to the
&ldquo;Object/library modules&rdquo; and in the &ldquo;Additional library path&rdquo;
give the path. AxisClient.lib can be found in [CHECKOUT_HOME]\c\bin once you build the AxisClient,AxisTransport,AxisXMLParserXerces
or AxisXMLParserExpat projects of the "Distribution" VC workspace.<br>
   <br>&nbsp;</p>
   <p>Now the client should be coded. Basically this will be a main method. We will
write the main method in the file Calculator.cpp of the VC project "calclient". This is the
stub generated by the java tool in the stub generation step.<br>
   <br>Add the following main method to Calculator.cpp<br>
  @@ -543,7 +568,11 @@
   printf("The result is : %d", result);
   }</pre>
   <br>
  -<p>Right click on the project and click &ldquo;Build&rdquo; on the menu that
appears.<br>If Visual C++ complains about missing libs go to Build-&gt;Rebuild All
(Do make sure that the apache server is stopped). Now the client exe is built.<br>Start
the Apache server by typing apache -k start and run the exe from Visual C++ by going to Build-&gt;Execute
calclient.exe. If all went well now you should see the SOAP Request, SOAP Response and the
result printed by calclient.exe.</p>
  +<p>It is better to have the path to your AxisXMLParser.dll and AxisTransport.dll
in axiscpp.conf or have the dlls where the client exe is.</p>
  +<p>Right click on the project and click &ldquo;Build&rdquo; on the menu that
appears.</p>
  +<p>When the XMLParser is running these steps occur.<br>1. Locate Parser dll.<br>2.
Create Parser instance by CreateInstance() method.<br>3. Give the stream to parser by
setInputStream() method.<br>4. Call next() method multiple times.<br>5. getStatus()
to see if the streams are properly passed.<br>6. Destroy parser object by DestroyInstance().<br>
  +</p>
  +<p>If Visual C++ complains about missing libs go to Build-&gt;Rebuild All (Do
make sure that the apache server is stopped). Now the client exe is built.<br> Start
the Apache server by typing apache -k start and run the exe from Visual C++ by going to Build-&gt;Execute
calclient.exe. If all went well now you should see the SOAP Request, SOAP Response and the
result printed by calclient.exe.</p>
   <p>
   <a name="providedservices"></a>
   </p>
  @@ -561,32 +590,29 @@
   <p>
   <br>1) Open the Visual C++ workspace (interoptests.dsw) at [CHECKOUT_HOME]\c\vc\samples\client\interoptests\
and do a batch build of all projects.<br>2) You need to build the AxisClient project
in the "Distribution" workspace at [CHECKOUT_HOME]\c\vc\, because you need the AxisClient.lib
to complile client applications and AxisClient.dll to run them.<br>3) You will find
the built console applications and AxisClient.dll at [CHECKOUT_HOME]\c\bin directory. Following
are the built .exe files. base.exe cbase.exe cgroupB.exe doclitbase.exe doclitgroupB.exe groupB.exe<br>4)
In order to run these samples you should have AxisClient.dll in the PATH environment variable
or in the same directory where the .exe is.</p>
   <p>
  -<a name="usingxerces"></a>
  +<a name="transport"></a>
   </p>
   <div class="h4">
  -<h4>BUILDING AXIS C++ WITH THE XERCES PARSER</h4>
  +<h4>Creating and Building your own transport layer</h4>
   </div>
  +<img alt="" src="images/c/parserd/transport.jpg"><p>When creating your own
transport layer refer SoapTransport.h header file for API.To see an example implementation
refer AxisTransport.h and AxisTransport.cpp</p>
  +<p>Implement SoapTransport.h interface according to rules described in the header
file.<br>Transport layer is built separately from Axis. Then Axis loads transport dynamic
library through following export functions which you also have to implement.</p>
  +<p>CreateInstance (SoapTransport *pOut)- Used by Axis to create an instance of your
transport class<br> DestroyInstance (SoapTransport *pIn) - Used by Axis to destroy the
created transport class instance</p>
  +<p>Compile your transport code and build a dynamic library. Add the name of your
transport library to axis configuration file (axiscpp.conf) so that Axis can find your library
at runtime.</p>
   <p>
  -<strong>Xerces-C</strong>
  -</p>
  -<p>A developer can use xerces-C parser as an alternative parser for the Expat. Once
you have got Axis c++ built and deployed with EXpat using the above instructions, by following
the instructions given below, you will be able to build and deploy Axis c++ with the Xerces
parser.</p>
  -<br>
  -<br>
  -<p>
  -<strong>How to use xerces as the parser for Axis C++</strong>
  +<a name="parser"></a>
   </p>
  -<p>In windows using Visual C++ 6.0 open the workspace "distribution" from vc++ at
[CHECKOUT_HOME]\c\vc\</p>
  -<p>1)Remove the files SoapParserExpat.cpp and WSDDDocumentExpat.cpp from the "AxisServer"
project and the "AxisClient" project.</p>
  -<p>2)Add the files "SoapBinInputStream.cpp", "SoapInputSource.cpp", "SoapParserXerces.cpp",
"XercesHandler.cpp" (which will be located in [CHECKOUT_HOME]\c\src\soap) and "WSDDDocumentXerces.cpp"
(which will be located in [CHECKOUT_HOME]\c\src\wsdd) to the "AxisServer" project and the
"AxisClient" project.</p>
  -<p>3)change the compiler directive "USE_EXPAT_PARSER" to "USE_XERCES_PARSER" (This
setting is in "project-&gt;settings-&gt;C/C++-&gt;prepocessor-&gt;Preprocessor
Definitions") in all the projects that this directive is used.</p>
  -<p>4)Add the Xerces header files from xerces binary distribution to [CHECKOUT_HOME]\c\include\xercesc
folder</p>
  -<p>5)Add the required Xerces libs (xerces-c_2.lib for release builds, xerces-c_2D.lib
for debug builds) from the Xerces binary distribution to [CHECKOUT_HOME]\c\lib\xerces-c folder
and give either xerces-c_2.lib or xerces-c_2D.lib as appropriate in "project-&gt;settings-&gt;link-&gt;input-&gt;object/library
modules" and give the path to those libs in "project-&gt;settings-&gt;link-&gt;additional
library path"</p>
  -<p>6)Remove libexpat.lib from the settings of the projects.</p>
  -<p>If you are using any other vc workspaces (e.g AxisDevelopment) do the same modifications
to the projects of those workspaces.</p>
  -<p>Now you can build the source. Once the source is built the dlls AxisServer.dll,
AxisClient.dll, mod_axis.dll or mod_axis2.dll will be generated in [CHECKOUT_HOME]\c\bin.<br>You
will need to put the xerces dlls somewhere pointed to by the PATH environment variable (xerces-c_2_2_0.dll
for release builds, xerces-c_2_2_0D.dll for debug builds) to run the server and the client.
(The recommended way of achieving this is to put the Xerces dlls in to [CHECKOUT_HOME]\Axis\libs
to which you should have set the PATH environment variable already).<br>
  +<div class="h4">
  +<h4>Creating and Building your own parser</h4>
  +</div>
  +<img alt="" src="images/c/parserd/parser.jpg"><p>
  +<strong>Note:Implement XMLParser.h interface according to rules described there.</strong>
   <br>
  -<br>NOTE: If you copy xerces dll files to [APACHE_HOME]\Axis\libs from a version
other than the one you used to build the Axis source with, you may have trouble starting up
the Apache web server.<br>
   </p>
  +<p>When creating your own parser refer XMLParser.h header file for API. To see an
example implementation refer SoapParserExpat.h,SoapParserExpat.cpp, SoapParserXerces.h and
SoapParserXerces.cpp.</p>
  +<p>Axis loads the parser dynamic library through following export functions which
you also have to implement.</p>
  +<p>CreateInstance() - Used by Axis to create an instance of your parser class<br>
DestroyInstance() - Used by Axis to destroy the created parser class instance</p>
  +<p>Compile your parser code and build a dynamic library. Add the name of your parser
library to Axis configuration file (axiscpp.conf) so that Axis can find your library at runtime</p>
   <div id="pdf" align="right">
   <a href="windev-guide.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br>
             PDF</a>
  
  
  
  1.7       +671 -300  ws-site/targets/axis/cpp/windev-guide.pdf
  
  	<<Binary file>>
  
  
  1.12      +12 -2     ws-site/targets/axis/cpp/winuser-guide.html
  
  Index: winuser-guide.html
  ===================================================================
  RCS file: /home/cvs/ws-site/targets/axis/cpp/winuser-guide.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- winuser-guide.html	17 May 2004 10:37:32 -0000	1.11
  +++ winuser-guide.html	27 May 2004 10:22:46 -0000	1.12
  @@ -285,9 +285,11 @@
   <br>
   <a href="#sample">Running your sample</a>
   <br> 
  +<a href="#transport">Axis Transport and Parser Library</a>
  +<br> 
   <a href="#handlers">Handlers</a>
   <br>
  -<br>
  +<br> 
   <strong>Before you follow this guide, make sure that you have followed the</strong>
<a href="wininstall-guide.html"><strong>Windows Installation guide</strong></a>
   </p>
   <p>
  @@ -353,7 +355,7 @@
   </div>
   <br>
   <p>With the WSDL2WS tool you have almost developed your client. What you have to
do next is write a file which has a main method and create an object of the stub and invoke
your methods on that.<br>1) Create a vc workspace.<br>2) Create a 'Win32 Console
Application'.<br>3) Add files to this project from the above generated 'ClientOut' folder.<br>4)
Set the include path to the include directory of the binary distribution.<br>5) Add
the following libs to the library modules path of this project.<br>
  -<br>AXIS_EXTRACT/lib/axis/<br>Axisclient.lib<br>AxisServer.lib<br>6)
Create a file with the main method which looks similar to the following and add this file
to this project.<br>
  +<br>AXIS_EXTRACT/lib/axis/<br>Axisclient.lib<br>AxisServer.lib<br>AxisTransport.lib<br>AxisXMLParser.lib<br>6)
Create a file with the main method which looks similar to the following and add this file
to this project.<br>
   </p>
   <pre>#include "Calculator.h"
   int main()
  @@ -376,6 +378,14 @@
   </p>
   <br>
   <p>SUCCESS ! If you get the result, you are done.</p>
  +<p>
  +<a name="transport"></a>
  +</p>
  +<div class="h4">
  +<h4>Transport Library and Parser Library</h4>
  +</div>
  +<p>AxisTransport.dll should be placed in the path that's specified by axiscpp.conf
(AXIS_FOLDER/axiscpp.conf).Or with the client.exe.</p>
  +<p>AxisXMLParser.dll should be placed in the path that's specified by axiscpp.conf.Or
with the client.exe.</p>
   <p>
   <a name="handlers"></a>
   </p>
  
  
  
  1.11      +178 -143  ws-site/targets/axis/cpp/winuser-guide.pdf
  
  	<<Binary file>>
  
  

Mime
View raw message