Staff-WSF Axis2C SOAP load service component on startup

67 views Asked by At

*Impl.h file of a service component has these functions:

virtual void OnCreate();
virtual void OnDestroy();

OnCreate is called only when the client makes a call to the service.

I'd like to have it when the server axis2_http_server is launched. (just one instance of my class that receives OnCreate when the whole server is started and OnDestroy when it is stopped)

Staff-WSF service has loadServiceAtStartup by default, but how to make it load my service components too?

1

There are 1 answers

0
loentar On BEST ANSWER

To load a service at server startup you must add loadAtStartup metacomment before service class declaration like this:

// *loadAtStartup: true
class MyService: public staff::IService
{

Please see this example for full header code.