/** * Singleton method */ public static function singleton() { if (!isset(self::$_instance)) { self::$_instance = new soap_server(); // Set the error handler WSCMError::setErrorHandler(new WSCMSoapErrorHandler()); // Configure the service self::$_instance->configureWSDL('WSCMService', 'urn:WSCMService'); } return self::$_instance; }