Compile and Deploy the Service
Before building this example, copy all provided sample files from <installdir>\examples\webservices\Handlers to the new HandlersExample directory, allowing the provided files to overwrite the generated files, as follows:
HandlersClient.cpp
Copy to HandlersExample\app\client
HandlersImp.cpp
Copy to HandlersExample\app\server
SoapSecurityHandler.h
StringReverseHandler.h
Copy to HandlersExample\app\client
handlers_handlers.xml
handlers_objects.xml
Copy to HandlersExample\conf
To compile the client and server, change to the directory HandlersExample, and run nmake (Windows) or make (Linux or UNIX).
To deploy the Agent, run nmake (Windows) or make (Linux or UNIX) for the deploy target, and then start the server.
NOTE: If the Agent is already running, you must first stop it before you deploy your service, using the rwsfserver stop command.
Windows
rwsfserver stop
nmake deploy
rwsfserver start
Unix/Linux
rwsfserver stop
make deploy
rwsfserver start
For more information on compiling and deploying, see Chapter 22.
Change directories to HandlersExample\bin, and run the client by entering:
Windows
prompt>HandlersClient.exe
Unix/Linux
prompt>HandlersClient
The server should return:
return value = 110
Security value = SomeSecurityData: From Server