protected function addArray($name, $xsdType)
    {
        if (isset($this->types[$name])) {
            return $this->types[$name];
        }
        //create the complexType tag beneath the xsd:schema tag
        $complexTypeTag = $this->addElement('xsd:complexType', $this->parentElement);
        $complexTypeTag->setAttribute('name', $name);
        $this->types[$name] = $complexTypeTag;

        $cc = $this->addElement('xsd:complexContent', $complexTypeTag);

        $rs = $this->addElement('xsd:restriction', $cc);
        $rs->setAttribute('base', 'SOAP-ENC:Array');

        $el = $this->addElement('xsd:attribute', $rs);
        $el->setAttribute('ref', 'SOAP-ENC:arrayType');
        $el->setAttribute('wsdl:arrayType', $xsdType.'[]');
    }