You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ro...@apache.org on 2004/05/28 12:16:57 UTC

cvs commit: ws-axis/site/src/documentation/content/xdocs/cpp winuser-guide.ihtml windev-guide.ihtml documentation.ihtml

roshan      2004/05/28 03:16:57

  Modified:    site/src/documentation/content/xdocs/cpp winuser-guide.ihtml
                        windev-guide.ihtml documentation.ihtml
  Log:
  Changed the user guide,developers guide back to version 1.1.1. and added the latest cvs doc to the cvs
  
  Revision  Changes    Path
  1.11      +10 -110   ws-axis/site/src/documentation/content/xdocs/cpp/winuser-guide.ihtml
  
  Index: winuser-guide.ihtml
  ===================================================================
  RCS file: /home/cvs/ws-axis/site/src/documentation/content/xdocs/cpp/winuser-guide.ihtml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- winuser-guide.ihtml	28 May 2004 05:30:50 -0000	1.10
  +++ winuser-guide.ihtml	28 May 2004 10:16:57 -0000	1.11
  @@ -19,13 +19,11 @@
   <br>
   <a href="#client">Coding the client</a>
   
  -<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>
  +<a href="#sample">Running your sample</a><br>
  +<br>
   <b>Before you follow this guide, make sure that you have followed the</b> <a
   href="wininstall-guide.html">
   
  @@ -42,7 +40,7 @@
   <p>Currently axis supports two methods to create and deploy a Web Service.
   <br>
   Method 1) A top down approach where you start with a WSDL. <br>
  -Method 2) A bottom up approach where you start with a pre-written web
  +Method 2) A bottom up apporach where you start with a pre-written web
   service. <br>
   
   
  @@ -62,13 +60,13 @@
   will generate the web service skeleton and other required files. 
   
   <br>
  -1) There is a folder called "simple" inside the samples/server folder in your axiscpp binary distribution.  Inside this you can find the relevant wsdl for the calculator sample .Get the wsdl (eg:<a href="../sample/server/simple/Calculator.wsdl">Calculator.wsdl</a>)
  +1) There is a folder called "simple" inside the samples/server folder in your axiscpp binary distribution.  Inside this you can find the  relevant wsdl for the calculator sample .Get the wsdl (eg:<a href="../sample/server/simple/Calculator.wsdl">Calculator.wsdl</a>)
   
   
   <br>
   2) Run the WSDL2WS tool (refer the section below 'How to use the WSDL2WS tool
   on the command line') and generate the server side skeletons and wrappers.
  -These files will be in two new folders which are generated from the tool
  +These files will be in two new folder which are generated from the tool
   called 'ServerOut' and 'ClientOut'. 
   <br>
   3) Create a VC workspace. 
  @@ -197,7 +195,7 @@
   
   <br>
   2) Go and add the following in the server.wsdd at the service level. Make
  -sure you add these lines at the correct place, i.e at service level.
  +sure you add these line at the correct place, i.e at service level.
   (APACHE_FOLDER/Axis/conf/server.wsdd)
   
   <br>
  @@ -218,7 +216,7 @@
   
   <h2>Deploying your web service Using AdminClient Tool</h2>
   
  -<p>The wsdl2ws Tool generates the deploy.wsdd and the undeploy.wsdd files needed for the AdminClient. Once we have these files, we have to deploy the web service (in this case the calculator service) with the AdminClient. We do this with the  AdminClient.exe which comes with axiscpp binary distribution. A typical invocation of the AdminClient looks like this.
  +<p>The wsdl2ws Tool generates the deploy.wsdd and the undeploy.wsdd files needed for the AdminClient. Once we have these  files, we have to deploy the web service (in this case the calculator service) with the AdminClient. We do this with the   AdminClient.exe which comes with axiscpp binary distribution. A typical invocation of the AdminClient looks like this.
   </p>
   <p>
   <b>AdminClient  &lt;server&gt; &lt;Port&gt; &lt;wsddfile&gt;</b>
  @@ -251,10 +249,6 @@
   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
  @@ -283,100 +277,6 @@
   <p><a name="caluculatorsample"></a></p>
   
   <br>
  -<p>SUCCESS ! If you get the result, you are done.</p>
  -
  -<p><a name="transport"></a></p>
  -
  -<h2>Transport Library and Parser Library</h2>
  -<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>
  -
  -<h2>Handlers</h2>
  -<p>Handlers are pluggable components in Axis C++. We have included a set of sample handlers for your reference. You could write your own handlers by following the instructions  given for the sample Handlers.</p>
  -<p><b>Note: If you are using Client side Handlers you need to enter the following entry in the AXIS_FOLDER/axiscpp.conf configuration file.</b></p>
  -<p>CLIENTWSDDFILEPATH:Axis\conf\client.wsdd</p>
  -<p>After entering this entry  to your AXIS_FOLDER/axiscpp.conf configuration file will look like:</p>
  -<p>AXISLOGPATH:Axis\logs\AxisLog.txt
  -<br>WSDDFILEPATH:Axis\conf\server.wsdd
  -<br>CLIENTWSDDFILEPATH:Axis\conf\client.wsdd</p>
  -<b>Testing the sample Handlers</b>
  -<p>We have included the following sample Handlers for your reference.</p>
  -<p>1)	echoStringHeaderHandler (A server side handler sample)
  -      This sample handler will simply echo (i.e send back) the string which you send in the SOAP request.
  -<br>2)testHandler (A client side handler sample)</p> 
  -<p>This sample handler will simply add a SOAP Header to the generated SOAP request.</p>
  -<p>Please note that these are very primitive sample handlers and are presented here to give you an idea about writing your own Handlers.</p>
  -<p><b>echoStringHeaderHandler</b></p>
  -<p><b>Building the Sample Handlers in VC</b></p>
  -<br>
  -<b>Building echoStringHeaderHandler (A server side handler sample)</b>
  -<br>
  -<p>The VC dsw file (ServerHandlers.dsw) is available at AXIS_EXTRACT/vc/samples/server/ ServerHandlers.dsw. Open this file and build the project echoStringHeaderHandler. Once the build is successful you will find the DLL (echoStringHeaderHandler.dll) at AXIS_EXTRACT/bin. If you see this DLL at the above location you are done with the first step.</p>
  -<p><b>Configuring the Handler</b></p>
  -<p>Now edit the AXIS_FOLDER /conf/server.wsdd to include the handler for a particular service.</p>
  -<p>&lt;service name="Calculator" provider="CPP:RPC" description="Simple Calculator Axis C++ Service "&gt
  -<br>
  -&lt;requestFlow name="CalculatorHandlers"&gt
  -<br>  
  -&lt;handler name="ESHHandler" type=" AXIS_EXTRACT/bin/echoStringHeaderHandler.dll"&gt
  -<br>
  -&lt;/handler&gt
  -<br>  
  -&lt;/requestFlow&gt
  -<br> 
  -&lt;responseFlow name="CalculatorHandlers"&gt
  -<br>      
  -&lt;handler name="ESHHandler" type=" AXIS_EXTRACT/bin/echoStringHeaderHandler.dll"&gt 
  -<br>    
  -&lt;/handler&gt
  -<br> 
  -&lt;/responseFlow&gt
  -<br> 
  -&lt;parameter name="allowedMethods" value="add sub mul div "/&gt
  -<br>
  -&lt;parameter name="className" value="Axis\webservices\Calculator.dll" /&gt
  -<br>
  -&lt;/service&gt</p>
  -<p><b>Note: Make sure you specify the correct path of the handler dll in the server.wsdd file.</b></p>
  -<p>Now you are almost done to run your server side handler.
  -<br>
  -Restart the Apache server and thats it.</p>
  -<br>
  -<br>
  -<b>Running the Handler</b>
  -<p>Since this Handler is configured to the Calculator web service in the above step, this Handler will be executed when a client send a SOAP request to the Calculator web service.</p>
  -<p><b>testHandler</b></p>
  -<p><b>Building the Sample Handlers in VC</b></p>
  -<p>Building testHandler (A client side handler sample)</p>
  -<p>The VC dsw file (ServerHandlers.dsw) is available at AXIS_EXTRACT/vc/samples/client/ClientHandlers.dsw. Open this file and build the project TestHandler. Once the build is successful you will find the DLL (testHandler.dll) at AXIS_EXTRACT/bin. If you see this DLL at the above location you are done with the first step.</p>
  -<p><b>Configuring the Handler</b></p>
  -<p>Now edit the AXIS_FOLDER /conf/client.wsdd to include the handler for a particular service.</p>
  -<p>&lt;service name="Calculator" provider="CPP:DOCUMENT" description="Calculator web service"&gt
  -<br>
  -&lt;requestFlow name="CalculatorHandlers"&gt 
  -<br>       
  -&lt;handler name="TestHandler" type=" AXIS_EXTRACT/bin/testHandler.dll"&gt
  -<br>
  -&lt;/handler&gt
  -<br>  
  -&lt;/requestFlow&gt
  -<br>
  -&lt;/service&gt</p>
  -<p><b>Note: Make sure you specify the correct path of the handler dll in the client.wsdd file.</b></p>
  -<p>Now you are almost done to run your client side handler.</p>
  -<p><b>Note: If you are using Client side Handlers you need to enter the CLIENTWSDDFILEPATH  entry in the AXIS_FOLDER/axiscpp.conf configuration file. (See above)</b></p>
  -<p><b>Running the Handler</b></p>
  -<p>Since this Handler is configured to the Calculator web service in the above step, this Handler will be executed when you run the calculator web service client. (It is at AXIS_EXTRACT/bin/Calculator.exe)</p>
  -<p>Handler Notes:</p>
  -<p>1)	You can see the Handler behavior through the TCP Monitor. (TCP Monitor is a Axis Java tool)
  -<br>
  -2)	To get an idea of Handlers look at the Handler sample source files.
  -<br>
  -a.	echoStringHeaderHandler (AXIS_EXTRACT/samples/server/echoStringHeaderHandler)
  -<br>
  -b.	testHandler
  -(AXIS_EXTRACT/samples/client/testHandler)</p>
  +SUCCESS ! If you get the result, you are done.</p>
   </body>
  -</html>
  +</html>
  \ No newline at end of file
  
  
  
  1.8       +72 -64    ws-axis/site/src/documentation/content/xdocs/cpp/windev-guide.ihtml
  
  Index: windev-guide.ihtml
  ===================================================================
  RCS file: /home/cvs/ws-axis/site/src/documentation/content/xdocs/cpp/windev-guide.ihtml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- windev-guide.ihtml	27 May 2004 09:43:41 -0000	1.7
  +++ windev-guide.ihtml	28 May 2004 10:16:57 -0000	1.8
  @@ -44,9 +44,7 @@
   <a href="#runclient">Coding and Running the client</a>
   
   <br>
  -<a href="#transport">Creating and Building your own transport layer</a>
  -<br>
  -<a href="#parser">Creating and Building your own parser</a>
  +<a href="#usingxerces">Building Axis C++ with the Xerces Parser</a>
   
   </p>
   
  @@ -130,7 +128,7 @@
   
   <p><a name="installapacheexpat"></a></p>
   
  -<h2>Installing Apache and Expat </h2>
  +<h2>Installing Apache and EXpat </h2>
   
   <br>
   
  @@ -213,17 +211,6 @@
   <br><br>
   &nbsp;</p>
   
  -<p><b>Axis Transport Library</b></p>
  -<p>In VC++ distribution workspace build AxisTransport project.Then AxisTransport.dll will be built.</p>
  -<p><b>Xerces Parser Library</b></p>
  -<p>In VC++ distribution workspace build AxisXMLParserXerces project. Then AxisXMLParserXerces.dll will be built.</p>  
  -<p><b>Expat Parser Library</b></p>
  -<p>In VC++ distribution workspace build AxisXMLParserExpat project. Then AxisXMLParserExpat.dll will be built</p> 
  -
  -<p><b> Building AxisTransport.dll and AxisXMLParser.dll</b>
  -<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><b>Building the AxisServer and AxisClient dlls </b> </p>
   
   
  @@ -232,7 +219,6 @@
   in [CHECKOUT_HOME]\c\bin.</p>
   
   
  -
   <p><a name="deployaxis"></a></p>
   
   
  @@ -264,12 +250,8 @@
   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>
  -<b>NOTE:</b>Usually it is a best practice to copy AxisServer.dll,AxisTransport.dll and AxisXMLParser.dll to [AXIS_HOME]\libs\ directory and
  +<b>NOTE:</b>Usually it is a best practice to copy AxisServer.dll to [AXIS_HOME]\libs\ directory and
   add that directory to your PATH environment variable.
   
   
  @@ -307,24 +289,22 @@
   <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>
  +will be the path to the server.wsdd file.<br>
   <br>
   i.e.<br>
  -AXISLOGPATH:[APACHE_HOME]\Axis\logs\AxisLog.log  
  +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>
  +WSDDFILEPATH: [APACHE_HOME]\Axis\conf\server.wsdd <br>
  +
  +
   
  -<p><b>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.</b></p>
   <br>
  -<p>6)Select start-&gt;programs-&gt;Apache HTTP server-&gt;Control Apache
  +6)Select start-&gt;programs-&gt;Apache HTTP server-&gt;Control Apache
   Server-&gt;stop to stop the apache server
   
   <br>
  @@ -340,6 +320,9 @@
   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></p>
   
   
  @@ -692,7 +675,7 @@
   
   
   <br>Add AxisClient.lib to the �Object/library modules� and in the �Additional library path� give the path.
  -AxisClient.lib can be found in [CHECKOUT_HOME]\c\bin once you build the AxisClient,AxisTransport,AxisXMLParserXerces or AxisXMLParserExpat  projects
  +AxisClient.lib can be found in [CHECKOUT_HOME]\c\bin once you build the AxisClient project
   of the "Distribution" VC workspace.
   <br>
   
  @@ -714,20 +697,12 @@
   }</pre>
   <br>
   
  -<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 �Build� on the menu that appears.
   
  -<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
  +<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>
  @@ -767,27 +742,60 @@
   <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="transport"></a></p>
  -<h2>Creating and Building your own transport layer</h2>
  -<img border="0" 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>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><a name="parser"></a></p>
  -<h2>Creating and Building your own parser</h2>
  -<img border="0" src="images/c/parserd/parser.jpg">
  - 
  -<p><b>Note:Implement XMLParser.h interface according to rules described there.</b><br>
  -<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>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>
  +<p><a name="usingxerces"></a></p>
  +<h2>BUILDING AXIS C++ WITH THE XERCES PARSER</h2>
  +
  +<p><b>Xerces-C</b>
  +
  +<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>
  +Download the Xerces-C 2.2.0( 32 bit binary release)from:
  +http://xml.apache.org/xerces-c/download.cgi<br>
  +
  +
  +
  +
  +
  +<p><B>How to use xerces as the parser for Axis C++</B></p>
  +
  +<p>In windows using Visual C++ 6.0 open the workspace "distribution" from vc++ at
  +[CHECKOUT_HOME]\c\vc\
  +
  +<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->settings->link->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><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>
   
   </body>
  -</html>
  +</html>
  \ No newline at end of file
  
  
  
  1.4       +1 -1      ws-axis/site/src/documentation/content/xdocs/cpp/documentation.ihtml
  
  Index: documentation.ihtml
  ===================================================================
  RCS file: /home/cvs/ws-axis/site/src/documentation/content/xdocs/cpp/documentation.ihtml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- documentation.ihtml	30 Dec 2003 14:23:49 -0000	1.3
  +++ documentation.ihtml	28 May 2004 10:16:57 -0000	1.4
  @@ -7,7 +7,7 @@
   <body>
   <h1>Axis c++ Documentation</h1>
   <br>
  -
  +<p>For the latest documentation refer the documentation in the CVS repository</p>
   
   <h2>Linux Documentation</h2>