def parse_services_response(response)
      doc = Nokogiri.XML(response)
      doc.remove_namespaces!
      service_nodes = doc.xpath('services/service')
      service_nodes.inject({}) do |result, node|
        service_code = node.at("service-code").text
        service_name = node.at("service-name").text
        service_link = node.at("link").attributes['href'].value
        service_link_media_type = node.at("link").attributes['media-type'].value
        result[service_code] = {
          :name => service_name,
          :link => service_link,
          :link_media_type => service_link_media_type
        }
        result
      end
    end
def parse_services_response(response)
      doc = Nokogiri.XML(response)
      doc.remove_namespaces!
      service_nodes = doc.xpath('services/service')
      service_nodes.inject({}) do |result, node|
        service_code = node.at("service-code").text
        service_name = node.at("service-name").text
        service_link = node.at("link").attributes['href'].value
        service_link_media_type = node.at("link").attributes['media-type'].value
        result[service_code] = {
          :name => service_name,
          :link => service_link,
          :link_media_type => service_link_media_type
        }
        result
      end
    end
service discovery