/** * Add a WSDL Complex Array Type to the Document * * Creates an Array Complex Type which references another Complex Type * * @param WsdlType $wsdlType The Type to Add * @return void */ private function addArrayType(WsdlType &$wsdlType) { // Create the WSDL Complex Content $complexContent = $this->createElement("complexContent"); // Create WSDL Attribute $attribute = $this->createElement("attribute"); $attribute->setAttribute("ref", "soapenc:arrayType"); if (WsdlType::isPrimitiveType($wsdlType->getBaseName())) { $attribute->setAttribute("wsdl:arrayType", "xsd:" . $wsdlType->getArrayTypeName()); } else { $attribute->setAttribute("wsdl:arrayType", "tns:" . $wsdlType->getArrayTypeName()); } // Create WSDL Restriction $restriction = $this->createElement("restriction"); $restriction->setAttribute("base", "soapenc:Array"); // Create the WSDL ComplexType $complexType = $this->createElement("complexType"); $complexType->setAttribute("name", $wsdlType->getName()); // Create the WSDL XML Nesting... $restriction->appendChild($attribute); $complexContent->appendChild($restriction); $complexType->appendChild($complexContent); // Append the Type WSDL To the WSDL Schema $wsdlSchema = $this->getSchema(); $wsdlSchema->appendChild($complexType); }