下午好,我有一个疑问,将是我试图获得结果但没有成功的日子。我希望有人能给我一个亮点,我能够将请求同步一组用户(例如情况(3))到认证服务器,该服务器返回我status = 200,这是告诉我工作正常的事情,但作为回应,来到我的回报是无效的,并应以这种方式返回用户,例如:
例如:{"tpUsuario":"admin","messages":["msg 1","msg 2","msg 3"],"name":"usuario"}
这是我做的方法:
@XmlElement
public void sincronizarUsuarios() {
Autenticacao groupThree = new Autenticacao();
groupThree.setIdGroup(3);
// The Config.REST_SERVICE_SYNC is my webService;
Response response = restFactory.getInvocationBuilder(Config.REST_SERVICE_SYNC).post(Entity.json(groupThree));
// Returns the status of my post and is returning me 200,
// This means that making requizição ie is working
System.out.println(response.getStatus());
// This should return me the Users in String format but
// Return null;
System.out.println(response.readEntity(String.class));
}
PS:谷歌翻译的语法,在巴西无能为力。