[xoops-cvslog 4410] CVS update: xoops2jp/html/modules/base/lib/ShadePlus

Back to archive index

Minahito minah****@users*****
2006年 9月 1日 (金) 12:13:11 JST


Index: xoops2jp/html/modules/base/lib/ShadePlus/ServiceServer.class.php
diff -u xoops2jp/html/modules/base/lib/ShadePlus/ServiceServer.class.php:1.1.2.1 xoops2jp/html/modules/base/lib/ShadePlus/ServiceServer.class.php:1.1.2.2
--- xoops2jp/html/modules/base/lib/ShadePlus/ServiceServer.class.php:1.1.2.1	Wed Aug 30 19:06:51 2006
+++ xoops2jp/html/modules/base/lib/ShadePlus/ServiceServer.class.php	Fri Sep  1 12:13:11 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package ShadePlus
- * @varsion $Id: ServiceServer.class.php,v 1.1.2.1 2006/08/30 10:06:51 minahito Exp $
+ * @varsion $Id: ServiceServer.class.php,v 1.1.2.2 2006/09/01 03:13:11 minahito Exp $
  * 
  * In the original BSD license, both occurrences of the phrase "COPYRIGHT
  * HOLDERS AND CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS".
@@ -62,30 +62,55 @@
 		//
 		foreach ($this->_mService->_mTypes as $className) {
 			if (class_exists($className)) {
-				$t_fieldArr = call_user_func(array($className, 'getPropertyDefinition'));
-				$t_arr = array();
-				foreach ($t_fieldArr as $t_field) {
-					$name = $t_field['name'];
-					$type = $t_field['type'];
+				if (call_user_func(array($className, 'isArray')) == true) {
+					$targetClassName = call_user_func(array($className, 'getClassName'));
 					
-					if (XCube_ServiceUtils::isXSD($t_field['type'])) {
-						$type = 'xsd:' . $type;
+					if (XCube_ServiceUtils::isXSD($targetClassName)) {
+						$targetClassName = 'xsd:' . $targetClassName;
 					}
 					else {
-						$type = 'tns:' . $type;
+						$targetClassName = 'tns:' . $targetClassName;
 					}
 					
-					$t_arr[$name] = array('name' => $name, 'type' => $type);
+					$this->_mServer->wsdl->addComplexType(
+						$className,
+						'complexType',
+						'array',
+						'',
+						'SOAP-ENC:Array',
+						array(),
+						array(
+							array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => $targetClassName . '[]')
+						),
+						$targetClassName
+					);
 				}
+				else {
+					$t_fieldArr = call_user_func(array($className, 'getPropertyDefinition'));
+					$t_arr = array();
+					foreach ($t_fieldArr as $t_field) {
+						$name = $t_field['name'];
+						$type = $t_field['type'];
+					
+						if (XCube_ServiceUtils::isXSD($t_field['type'])) {
+							$type = 'xsd:' . $type;
+						}
+						else {
+							$type = 'tns:' . $type;
+						}
+					
+						$t_arr[$name] = array('name' => $name, 'type' => $type);
+					}
 				
-				$this->_mServer->wsdl->addComplexType(
-					$className,
-					'complexType',
-					'struct',
-					'all',
-					'',
-					$t_arr
-				);
+					$this->_mServer->wsdl->addComplexType(
+						$className,
+						'complexType',
+						'struct',
+						'all',
+						'',
+						$t_arr
+					);
+				}
 			}
 		}
 	}


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