#include <BasicHandler.h>
Inheritance diagram for HandlerBase:
Public Methods | |
HandlerBase () | |
virtual | ~HandlerBase () |
virtual int AXISCALL | invoke (void *pMsg)=0 |
virtual void AXISCALL | onFault (void *mMsg)=0 |
virtual int AXISCALL | init ()=0 |
virtual int AXISCALL | fini ()=0 |
virtual int AXISCALL | getType ()=0 |
|
Constructor. |
|
Destructor. |
|
The finalization tasks which needs to be performed within a Handler has to be written here. This method will be automatically called by the Axis Engine when it unloads a handler.
|
|
Gets and returns the type of the handler. The return value could be :
Implemented in Handler, and WrapperClassHandler. |
|
The initialization tasks which needs to be performed within a Handler has to be written here. This method will be automatically called by the Axis Engine when it loads a handler.
|
|
The invoke method is automatically called by the Axis Engine when it needs to execute a Handler. The main task of the handler which a Handler writer expects the Handler to be performed needs to be written within the invoke method of the Handler. A example code segment within a invoke method which is written to process a SOAP Header is as following: int ESHHandler::invoke(void *pvIMsg) { IMessageData *pIMsg = (IMessageData*) pvIMsg; AxisChar* pachTemp; if(pIMsg->isPastPivot()) { //this is a response IHandlerSoapSerializer* pISZ; pIMsg->getSoapSerializer(&pISZ); IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock(); pIHeaderBlock->setLocalName("echoMeStringResponse"); pIHeaderBlock->setUri("http://soapinterop.org/echoheader/"); pachTemp = "EchoStringHeaderHandlerPr1.id"; const AxisChar* pachHeaderVal = pIMsg->getProperty(pachTemp); printf("in the ESHHandler::Invoke : s In case of a Web Service Handler the invoke method should do what is required by a web service invoke method, which is different from the above shown example.
|
|
Called when ever a fault is occured within the handler. The tasks which needs to be persormed when ever an error occurs within a Handler has to be written within this method.
|