# File lib/openid/yadis/xrires.rb, line 45
        def query(xri)
          # these can be query args or http headers, needn't be both.
          # headers = {'Accept' => 'application/xrds+xml;sep=true'}
          canonicalID = nil

          url = self.query_url(xri)
            begin
              response = OpenID.fetch(url)
            rescue
              raise XRIHTTPError, "Could not fetch #{xri}, #{$!}"
            end
            raise XRIHTTPError, "Could not fetch #{xri}" if response.nil?

            xrds = Yadis::parseXRDS(response.body)
            canonicalID = Yadis::get_canonical_id(xri, xrds)

          return canonicalID, Yadis::services(xrds)
          # TODO:
          #  * If we do get hits for multiple service_types, we're almost
          #    certainly going to have duplicated service entries and
          #    broken priority ordering.
        end