'Resolve some services for an XRI.
Note: I don\'t implement any service endpoint selection beyond what
the resolver I\'m querying does, so the Services I return may well
include Services that were not of the types you asked for.
May raise fetchers.HTTPFetchingError or L{etxrd.XRDSError} if
the fetching or parsing don\'t go so well.
@param xri: An XRI to resolve.
@type xri: unicode
@param service_types: A list of services types to query for.  Service
types are URIs.
@type service_types: list of str
@returns: tuple of (CanonicalID, Service elements)
@returntype: (unicode, list of C{ElementTree.Element}s)'

def query(self, xri, service_types):

    services = []
    canonicalID = None
    for service_type in service_types:
        url = self.queryURL(xri, service_type)
        response = fetchers.fetch(url)
        if (response.status not in (200, 206)):
            continue
        et = etxrd.parseXRDS(response.body)
        canonicalID = etxrd.getCanonicalID(xri, et)
        some_services = list(iterServices(et))
        services.extend(some_services)
    return (canonicalID, services)
