@GET @Path("hosts.xml") @Produces(MediaType.TEXT_XML) @RestQuery(name = "hostsasxml", description = "Returns a host registraton or list of available host registrations as XML.", returnDescription = "The host list as XML", reponses = { @RestResponse(responseCode = SC_OK, description = "Returned the available hosts.") }) public JaxbHostRegistrationList getHostsAsXml() throws NotFoundException { JaxbHostRegistrationList registrations = new JaxbHostRegistrationList(); try { for (HostRegistration reg : serviceRegistry.getHostRegistrations()) registrations.add(new JaxbHostRegistration(reg)); return registrations; } catch (ServiceRegistryException e) { throw new WebApplicationException(e); } }