# wso2wsf::ServiceSkeleton Class Reference
[ServiceSkeleton]

class ServiceSkeleton represents the Interface that should be implemented by any CPP service to be deployed with WSF/CPP. This class defines 3 virtual methods which should be overridden by the implementation class. They are init() which performs any initialization required, invoke() which should handle the business logic processing for the services, and onFault() which should implement the fault handling. More...

`#include <ServiceSkeleton.h>`

List of all members.

## Public Member Functions
virtual OMElement * | invoke (OMElement *omEle, MessageContext *msgCtx)
virtual OMElement * | onFault (OMElement *omEle)
virtual void | init ()
virtual | ~ServiceSkeleton ()

## Detailed Description

class ServiceSkeleton represents the Interface that should be implemented by any CPP service to be deployed with WSF/CPP. This class defines 3 virtual methods which should be overridden by the implementation class. They are init() which performs any initialization required, invoke() which should handle the business logic processing for the services, and onFault() which should implement the fault handling.

## Constructor & Destructor Documentation

wso2wsf::ServiceSkeleton::~ServiceSkeleton | ( |  | ) | `[inline, virtual]`

Destructor for ServiceSkeleton.

## Member Function Documentation

virtual void wso2wsf::ServiceSkeleton::init | ( |  | ) | `[inline, virtual]`

Initialization method. Any service specific initialization can be done here.

virtual OMElement* wso2wsf::ServiceSkeleton::invoke | ( | OMElement * | omEle,
|  | MessageContext * | msgCtx |
| ) |  |  | `[inline, virtual]`

This method is called for handling the business logic of the service Services should implement this method in order to process the soap meesage's content.

Parameters:

  | omEle | is the first child of the SOAP Body element. The msgCtx is the message context of the out going message flow. The MessageContext object carries all the contextual details related to the soap message. Various details of the SOAP Message can be accessed using the MessageContext. This function should return the resultant OMElement which would be sent back to the message sender.
  | omEle | pointer to message that is passed in.
  | msgCtx | pointer to the Out Message Context.

Returns:
  Returns the response OMElement constructed.

virtual OMElement* wso2wsf::ServiceSkeleton::onFault | ( | OMElement * | omEle | ) | `[inline, virtual]`

This is the handler to be invoked when a Fault occurs. The Service implementor should implement any service specific fault handling here. This method is called, when the message exchange pattern is Request,Response and the invoke() method has already failed.

Parameters:

  | omEle | omEle is the received SOAP Body's first child element.

Returns:
  OMElement Constructed Fault OMElement.

The documentation for this class was generated from the following file:

- ServiceSkeleton.h