Web Service client -HTTP 404 Not Found

0 respostas
E

fiz um web service, onde aparece o xml, com o endereço: http://localhost:8081/lojatest/restful/projetos/1 aparece normalmente o xml no browser, tentei fazer o client forma abaixo, porém da erro de:HTTP 404 Not Found

public class ProjetoRestClient {
	public static void main(String[] args) {

		invokeAllProjetoService();
	}

	private static void invokeAllProjetoService() {
		
		  Client client = ClientBuilder.newClient();
          WebTarget target = client.target("http://localhost:8081/");
          String conteudo = target.path("/projetos/1").request().get(String.class);
          Projeto carrinho = (Projeto) new XStream().fromXML(conteudo);
Criado 1 de setembro de 2014
Respostas 0
Participantes 1