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