You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by ro...@apache.org on 2004/05/06 13:28:58 UTC

cvs commit: ws-site/targets/axis/cpp winuser-guide.pdf winuser-guide.html

roshan      2004/05/06 04:28:58

  Modified:    targets/axis/cpp winuser-guide.pdf winuser-guide.html
  Log:
  Update the finalized windows documents to reflect handler details
  
  Revision  Changes    Path
  1.6       +163 -96   ws-site/targets/axis/cpp/winuser-guide.pdf
  
  	<<Binary file>>
  
  
  1.7       +67 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- winuser-guide.html	16 Apr 2004 16:29:51 -0000	1.6
  +++ winuser-guide.html	6 May 2004 11:28:58 -0000	1.7
  @@ -291,7 +291,7 @@
   <h4>Creating the web service</h4>
   </div>
   <br>
  -<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 apporach where you start with a pre-written web service.<br>
  +<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 service.<br>
   <br>Here we discuss the first apporach since the tool to support Method 2 (i.e wcg.exe) is in a primitive and frozen state.<br>Here the document is written with the idea that the user uses Visual C++ (VC). But the user could use this guide with a different IDE of his choice.<br>
   <br>
   <strong>Method 1</strong>
  @@ -322,7 +322,7 @@
   </div>
   <br>
   <p>Axis cpp user can use the AdminClient tool to deploy a service or manually deploy. The first section shows you how to deploy your Web Service manually, without using the AdminClient tool.<br>Say the apache installation folder is APACHE_FOLDER.<br>(For the default installation this is "C:\Program Files\Apache Group\Apache" for apache 1.3.X and "C:\Program Files\Apache Group\Apache2" for apache 2.X).<br>
  -<br>1) Copy the above Calculator.dll to the folder APACHE_FOLDER/Axis/webservices.<br>2) Go and add the following in the server.wsdd at the service level. Make sure you add these line at the correct place, i.e at service level. (APACHE_FOLDER/Axis/conf/server.wsdd)<br>
  +<br>1) Copy the above Calculator.dll to the folder APACHE_FOLDER/Axis/webservices.<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. (APACHE_FOLDER/Axis/conf/server.wsdd)<br>
   <br>&lt;service name="Calculator" provider="C:RPC" description="Calculator Web Service"&gt;<br>&lt;parameter name="className" value="APACHE_FOLDER\Axis\webservices\Calculator.dll"/&gt;<br>&lt;parameter name="allowedMethods" value="add subtract "/&gt;<br>&lt;/service&gt;<br>
   <br>Now you have deployed your web service</p>
   <p>
  @@ -369,8 +369,73 @@
   <a name="caluculatorsample"></a>
   </p>
   <br>
  +<p>SUCCESS ! If you get the result, you are done.</p>
  +<div class="h4">
  +<h4>Handlers</h4>
  +</div>
  +<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>
  +<strong>Note: If you are using Client side Handlers you need to enter the following entry in the AXIS_FOLDER/axiscpp.conf configuration file.</strong>
  +</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>
  +<strong>Testing the sample Handlers</strong>
  +<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>
  +<br>
  +<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>
  +<strong>echoStringHeaderHandler</strong>
  +</p>
  +<p>
  +<strong>Building the Sample Handlers in VC</strong>
  +</p>
  +<br>
  +<strong>Building echoStringHeaderHandler (A server side handler sample)</strong>
  +<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>
  +<strong>Configuring the Handler</strong>
  +</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>
  +<strong>Note: Make sure you specify the correct path of the handler dll in the server.wsdd file.</strong>
  +</p>
  +<p>Now you are almost done to run your server side handler.<br>Restart the Apache server and thats it.</p>
   <br>
   <br>
  +<strong>Running the Handler</strong>
  +<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>
  +<strong>testHandler</strong>
  +</p>
  +<p>
  +<strong>Building the Sample Handlers in VC</strong>
  +</p>
  +<p>Building testHandler (A client side handler sample)</p>
  +<br>
  +<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>
  +<strong>Configuring the Handler</strong>
  +</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>
  +<strong>Note: Make sure you specify the correct path of the handler dll in the client.wsdd file.</strong>
  +</p>
  +<p>Now you are almost done to run your client side handler.</p>
  +<p>
  +<strong>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)</strong>
  +</p>
  +<p>
  +<strong>Running the Handler</strong>
  +</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>
   <div id="pdf" align="right">
   <a href="winuser-guide.pdf"><img alt="PDF" src="../skin/images/pdfdoc.gif" class="skin"><br>
             PDF</a>