[xoops-cvslog 3384] CVS update: xoops2jp/html/modules/base/preload/Primary

Back to archive index

Minahito minah****@users*****
2006年 6月 28日 (水) 14:47:00 JST


Index: xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php
diff -u xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.1 xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.2
--- xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.1	Mon Jun 26 19:26:54 2006
+++ xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php	Wed Jun 28 14:47:00 2006
@@ -2,11 +2,45 @@
 
 if (!defined("XOOPS_ROOT_PATH")) exit();
 
+require_once XOOPS_ROOT_PATH . "/class/XCube_Service.class.php";
+
 class Legacy_NuSoapLoader extends XCube_ActionFilter
 {
 	function preFilter()
 	{
 		require_once XOOPS_ROOT_PATH . "/modules/base/lib/nusoap/nusoap.php";
+		$this->mController->mRoot->mDelegateManager->add('XCube_ServiceManager.CreateClient', array('Legacy_NuSoapLoader', 'createClient'));
+	}
+	
+	function createClient(&$client, $service)
+	{
+		if (is_object($client) || !is_object($service)) {
+			return;
+		}
+
+		if ($service->isOuterService()) {		
+			$client = new Legacy_SoapClient($service);
+		}
+		else {
+			$client = new XCube_ServiceClienet($service);
+		}
+	}
+}
+
+class Legacy_SoapClient extends XCube_AbstractServiceClient
+{
+	var $mClient = null;
+	
+	function Legacy_SoapClient(&$service)
+	{
+		parent::XCube_AbstractServiceClient($service);
+		$this->mClient =& new soapclient($service->getWSDLUrl(), true);
+	}
+	
+	function call()
+	{
+		$args = func_get_args();
+		return call_user_func_array(array($this->mClient, 'call'), $args);
 	}
 }
 


xoops-cvslog メーリングリストの案内
Back to archive index