'Construct a I{composite} reply.  This method is called when it has been
detected that the reply has multiple root nodes.
@param rtypes: A list of known return I{types}.
@type rtypes: [L{suds.xsd.sxbase.SchemaObject},...]
@param nodes: A collection of XML nodes.
@type nodes: [L{Element},...]
@return: The I{unmarshalled} composite object.
@rtype: L{Object},...'

def replycomposite(self, rtypes, nodes):

    dictionary = {}
    for rt in rtypes:
        dictionary[rt.name] = rt
    unmarshaller = self.unmarshaller()
    composite = Factory.object('reply')
    for node in nodes:
        tag = node.name
        rt = dictionary.get(tag, None)
        if (rt is None):
            if (node.get('id') is None):
                raise Exception(('<%s/>    not    mapped    to    message    part' % tag))
            else:
                continue
        resolved = rt.resolve(nobuiltin=True)
        sobject = unmarshaller.process(node, resolved)
        value = getattr(composite, tag, None)
        if (value is None):
            if rt.unbounded():
                value = []
                setattr(composite, tag, value)
                value.append(sobject)
            else:
                setattr(composite, tag, sobject)
        else:
            if (not isinstance(value, list)):
                value = [value]
                setattr(composite, tag, value)
            value.append(sobject)
    return composite
