19 require_once(BASE.
"wcmf/lib/util/class.Log.php");
20 require_once(BASE.
"wcmf/lib/presentation/class.Request.php");
21 require_once(BASE.
"wcmf/lib/presentation/class.Response.php");
22 require_once(BASE.
"wcmf/lib/remoting/class.HTTPClient.php");
23 require_once(BASE.
"wcmf/lib/remoting/class.RPCClient.php");
24 require_once(BASE.
"wcmf/lib/util/class.ObjectFactory.php");
44 static $instance = null;
46 if (!isset($instance))
57 function doCall($serverKey, $request)
62 $response = $client->call($request);
74 if (!isset($this->_clients[$serverKey]))
77 if (($serverDef = $parser->getValue($serverKey,
'remoteserver')) !==
false)
83 if (strpos($serverDef,
'http://') === 0 || strpos($serverDef,
'https://') === 0) {
87 $client =
new RPCClient($serverDef, $user);
89 $this->_clients[$serverKey] = $client;
94 $parser->getErrorMsg(), __FILE__, __LINE__);
98 return $this->_clients[$serverKey];
107 if (!isset($this->_users[$serverKey]))
110 if (($remoteLogin = $parser->getValue($serverKey,
'remoteuser')) !==
false)
113 $userManager = &$objectFactory->createInstanceFromConfig(
'implementation',
'UserManager');
114 $user = &$userManager->getUser($remoteLogin);
116 $this->_users[$serverKey] = $user;
120 WCMFException::throwEx(
"The remote user with login '".$remoteLogin.
"' does not exist.\n", __FILE__, __LINE__);
127 $parser->getErrorMsg(), __FILE__, __LINE__);
131 return $this->_users[$serverKey];
RemotingFacade is used to communicate with other wCMF instances.
RPCClient is used to do calls to other wCMF instances on the same maschine.
doCall($serverKey, $request)
throwEx($message, $file='', $line='')
HTTPClient is used to do calls to other wCMF instances over HTTP.
getRemoteUser($serverKey)
Response holds the response values that are used as output from Controller instances. It is typically instantiated by the ActionMapper instance and filled during Controller execution.