Return-Path:
2)testHandler (A client side handler sample)
This sample handler will simply add a SOAP Header to the generated SOAP request.
-Please note that these are very primitive sample handlers and are presented here to give you an idea about writing your own Handlers.
echoStringHeaderHandler
Building the Sample Handlers in VC
@@ -304,29 +303,29 @@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.
Configuring the Handler
Now edit the AXIS_FOLDER /conf/server.wsdd to include the handler for a particular service.
-<service name="Calculator" provider="CPP:RPC" description="Simple Calculator Axis C++ Service ";> +
<service name="Calculator" provider="CPP:RPC" description="Simple Calculator Axis C++ Service ">
-<requestFlow name="CalculatorHandlers";>
+<requestFlow name="CalculatorHandlers">
-<handler name="ESHHandler" type=" AXIS_EXTRACT/bin/echoStringHeaderHandler.dll";>
+<handler name="ESHHandler" type=" AXIS_EXTRACT/bin/echoStringHeaderHandler.dll">
-</handler;>
+</handler>
-</requestFlow;>
+</requestFlow>
-<responseFlow name="CalculatorHandlers";>
+<responseFlow name="CalculatorHandlers">
-<handler name="ESHHandler" type=" AXIS_EXTRACT/bin/echoStringHeaderHandler.dll";>
+<handler name="ESHHandler" type=" AXIS_EXTRACT/bin/echoStringHeaderHandler.dll">
-</handler;>
+</handler>
-</responseFlow;>
+</responseFlow>
-<parameter name="allowedMethods" value="add sub mul div "/;>
+<parameter name="allowedMethods" value="add sub mul div "/>
-<parameter name="className" value="Axis\webservices\Calculator.dll" /;>
+<parameter name="className" value="Axis\webservices\Calculator.dll" />
-</service;>
Note: Make sure you specify the correct path of the handler dll in the server.wsdd file.
Now you are almost done to run your server side handler.
@@ -338,21 +337,20 @@
testHandler
Building the Sample Handlers in VC
Building testHandler (A client side handler sample)
-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.
Configuring the Handler
Now edit the AXIS_FOLDER /conf/client.wsdd to include the handler for a particular service.
-<service name="Calculator" provider="CPP:DOCUMENT" description="Calculator web service";> +
<service name="Calculator" provider="CPP:DOCUMENT" description="Calculator web service">
-<requestFlow name="CalculatorHandlers";>
+<requestFlow name="CalculatorHandlers">
-<handler name="TestHandler" type=" AXIS_EXTRACT/bin/testHandler.dll";>
+<handler name="TestHandler" type=" AXIS_EXTRACT/bin/testHandler.dll">
-</handler;>
+</handler>
-</requestFlow;>
+</requestFlow>
-</service;>
Note: Make sure you specify the correct path of the handler dll in the client.wsdd file.
Now you are almost done to run your client side handler.
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)