protected function addComplexTypeArray($singularType, $type)
    {
        $xsdComplexTypeName = 'ArrayOf' . static::typeToQName($singularType);
        $xsdComplexType = 'tns:' . $xsdComplexTypeName;

        // Register type here to avoid recursion.
        $this->addType($type, $xsdComplexType);

        // Process singular type using DefaultComplexType strategy.
        $this->addComplexType($singularType);

        // Add array type structure to WSDL document.
        $complexType = $this->dom->createElement('xsd:complexType');
        $complexType->setAttribute('name', $xsdComplexTypeName);

        $complexContent = $this->dom->createElement('xsd:complexContent');
        $complexType->appendChild($complexContent);

        $xsdRestriction = $this->dom->createElement('xsd:restriction');
        $xsdRestriction->setAttribute('base', 'soap-enc:Array');
        $complexContent->appendChild($xsdRestriction);

        $xsdAttribute = $this->dom->createElement('xsd:attribute');
        $xsdAttribute->setAttribute('ref', 'soap-enc:arrayType');
        $xsdAttribute->setAttribute('wsdl:arrayType', 'tns:' . static::typeToQName($singularType) . '[]');
        $xsdRestriction->appendChild($xsdAttribute);

        $this->schema->appendChild($complexType);

        return $xsdComplexType;
    }