If you are using handlers, you must configure the WSDD file, which contains the rules governing when the AxisClient must invoke a handler library. Service handlers and global handlers are defined in separate sections of the WSDD file.
The WSDD file is an XML style file containing information that Web Services Client for C++ uses as it builds request messages and decodes response messages. A WSDD file has two main sections, one for service handlers and one for global handlers. For service handlers, each service definition that requires a handler must be defined with the appropriate handler list given for pre-pivot and post-pivot invocation. For global handlers, the WSDD file only needs to list those handlers that are to be invoked pre-pivot and post-pivot. For further information about global handlers see WSDD file.
The table below shows a line by line example of a WSDD file required to invoke the handler on both the request and response sides. Note that the handler filenames vary according to the operating system. The filenames used in this example are for Windows.
Line number | WSDD line |
---|---|
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:C="http://xml.apache.org/axis/wsdd/providers/c"> |
3 | <service name="Handler" provider="CPP:DOCUMENT" description="Handler"> |
4 | <requestFlow> |
5 | <handler name="myClientHandlerReq"
type="<inst_dir>\samples\handlers\myClientHandler.dll">
|
6 | </handler> |
7 | </requestFlow> |
8 | <responseFlow> |
9 | <handler name="myClientHandlerRes"
type="<inst_dir>\samples\handlers\myClientHandler.dll">
|
10 | </handler> |
11 | </responseFlow> |
12 | </service> |
13 | </deployment> |
The following table describes the important parts of the WSDD file:
Line number | Description |
---|---|
2 | The deployment tag is the root element. |
3 | The service tag defines the type of Axis service. The name attribute defines the name of the service. The provider attribute defines the name of the provider for the service, and must appear in xmlns:C="http://xml.apache.org/axis/wsdd/providers/c”. The description attribute defines a comment for this line. |
4 | The requestFlow tag defines the start of a list of one or more handlers that are invoked when a request message is about to be transmitted. The handlers are invoked in the order in which they appear in the WSDD file. |
5 | The handler tag within a requestFlow defines the unique name of a handler to be invoked, and its type, which is a fully qualified path to the location of the handler. |
8 | The responseFlow tag defines the start of a list of one or more handlers that are invoked when a response message has just been received. The handlers are invoked in the order in which they appear in the WSDD file. |
9 | The handler tag within a responseFlow defines the unique name of a handler to be invoked, and its type, which is a fully qualified path to the location of the handler. |
For a more detailed description of each tag and the parts that it may contain, see WSDD file.