Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * Handles an error by calling the WSError error handler
  * 
  * @param WSError Error
  */
 protected function handleError($error)
 {
     $handler = WSError::getErrorHandler();
     $handler->handle($error);
 }