NonStop SOAP 4.1 User's Manual
Creating the service skeleton structure
To create the service skeleton, you must:
1. Define the service skeleton structure of type axis2_svc_skeleton_t.
2. Allocate memory for the service skeleton structure.
For example:
axis2_svc_skeleton_t *soap4service_svc_skeleton = NULL;
soap4service_svc_skeleton = AXIS2_MALLOC
(env->allocator, sizeof(axis2_svc_skeleton_t));
Setting the service skeleton operations structure
After you create the service skeleton structure, the callback functions that implement the service
initialization, business logic, and fault handling must be set in the operations structure of the service
skeleton structure of type axis2_svc_skeleton_ops_t.
Synopsis:
static const axis2_svc_skeleton_ops_t
soap4service_svc_skeleton_ops_var =
{
soap4service_init
soap4service_invoke
soap4service_on_fault
soap4service_free
}
where,
soap4service_init
is the function that implements the service initialization logic for the service.
soap4service_invoke
is the function that implements the business logic for the service.
soap4service_on_fault
is the function that implements the fault handling for the service.
soap4service_free
is the function that implements the service cleanup activities.
NOTE: The soap4service_svc_skeleton_ops_var structure must be a global variable in
the service implementation.
After you create the service skeleton operations structure, assign it to the ops field in the created
service skeleton structure.
For example:
soap4service_svc_skeleton->ops = &soap4service_svc_skeleton_ops_var;
Returning the service skeleton structure to the service
After you create and set the service skeleton structure, return the service skeleton structure to NonStop
SOAP 4.
For example:
return soap4service_svc_skeleton;
The axis2_remove_instance()Function
The axis2_remove_instance()function removes the service skeleton structure from the memory.
NonStop SOAP 4 calls the axis2_remove_instance()function when the NonStop SOAP 4
server exits.
86 NonStop SOAP 4 Service APIs










