WebSphere Web Services Client for C++, Version 1.0.1 Operating Systems: Linux, Solaris

Developing client side handlers

To develop a client side handler, you first create the required files, which you can do using any text editor, and then build the client library.

Why and when to perform this task

To create a handler, you first create a client handler header file, a client handler file and client handler factory file. You can then use these files to build your handler library in the same way as you would any other library.

If you are writing more than one handler, you must remember to ensure that the handler names are unique.

To create and build a handler, complete the following steps, which use the example of the myclientHandler library.

Steps for this task

  1. Change the current working directory to where the project myClientHandler is to be built (for example, <inst_dir>/samples/handlers).
  2. Create the three basic files required for the handler:
    1. Using any text editor, create three new files named myClientHandler.cpp, myClientHandler.hpp and myClientHandlerFactory.cpp (see Required handler files).
    2. Into each file, copy the sample code described in Sample client handler code.
    3. Save the new files in the current directory.
  3. Build the handler library:
    1. On Linux, type the following build command:
      gcc -I <inst_dir>/include/ *.cpp -L <inst_dir>/lib/ -l axis_client –shared 
      -o myClientHandler.so
    2. On Windows, type the following build command:
      cl /MT /D "WIN32" /I<inst_dir>\include *.cpp /link<inst_dir>
      \lib\AxisClient.lib /dll /out:"myClientHandler.dll"
  4. Check that the client handler library file has been created.
  5. Create or amend the WSDD file to include a definition for each handler that you create. For further information about handler definitions, see Handler definitions in WSDD file.
  6. Make sure that the axiscpp.conf file includes a line defining the path for the WSDD file. For further information about the file path definition, see WSDD file path definition in axiscpp.conf file.

What to do next

After you have finished developing your handlers, you are ready to deploy your application as described in Deploying web service client applications with handlers.

Task topic

Terms of Use | Rate this page

Timestamp iconLast updated: 12 Dec 2005
(C) Copyright IBM Corporation 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)