private function addMessage($name, $parts)
    {
        $this->addToDebug("Adding message: '$name'");
        $msg = $this->addElement('message', $this->definitions);
        $msg->setAttribute('name', $name);
        foreach ((array) $parts as $partName => $partType) {
            $this->addToDebug("Adding Message part: '$partName => $partType'");
            $part = $this->addElement('part', $msg);
            $this->xmlSchema->addType($partType, $partName, $part);
        }
    }