26 #require_once "Zend/Soap/Wsdl/Strategy/DefaultComplexType.php"; 49 if (in_array(
$type, $this->_inProcess)) {
50 return "tns:" .
$type;
56 if($nestingLevel > 1) {
57 #require_once "Zend/Soap/Wsdl/Exception.php"; 59 "ArrayOfTypeComplex cannot return nested ArrayOfObject deeper than ".
60 "one level. Use array object properties to return deep nested data. 67 #require_once "Zend/Soap/Wsdl/Exception.php"; 69 "Cannot add a complex type %s that is not an object or where ".
70 "class could not be found in 'DefaultComplexType' strategy.",
$type 74 if($nestingLevel == 1) {
78 $xsdComplexTypeName = $singularType;
82 if(!in_array($singularType, $this->
getContext()->getTypes())) {
83 parent::addComplexType($singularType);
86 unset($this->_inProcess[
$type]);
87 return "tns:".$xsdComplexTypeName;
96 if(!in_array($xsdComplexTypeName, $this->
getContext()->getTypes())) {
97 $complexType = $dom->createElement(
'xsd:complexType');
98 $complexType->setAttribute(
'name', $xsdComplexTypeName);
100 $complexContent = $dom->createElement(
"xsd:complexContent");
101 $complexType->appendChild($complexContent);
103 $xsdRestriction = $dom->createElement(
"xsd:restriction");
104 $xsdRestriction->setAttribute(
'base',
'soap-enc:Array');
105 $complexContent->appendChild($xsdRestriction);
107 $xsdAttribute = $dom->createElement(
"xsd:attribute");
108 $xsdAttribute->setAttribute(
"ref",
"soap-enc:arrayType");
109 $xsdAttribute->setAttribute(
"wsdl:arrayType", sprintf(
"tns:%s[]", $singularType));
110 $xsdRestriction->appendChild($xsdAttribute);
112 $this->
getContext()->getSchema()->appendChild($complexType);
113 $this->
getContext()->addType($xsdComplexTypeName);
116 return $xsdComplexTypeName;
121 return sprintf(
'ArrayOf%s',
$type);
132 return str_replace(
"[]",
"",
$type);
143 return substr_count(
$type,
"[]");
_getXsdComplexTypeName($type)
_addArrayOfComplexType($singularType, $type)
_getSingularPhpType($type)