0
I’m trying to develop a service Rest for my father’s store, I’m able to bring the results in JSON through the URL, but when I try to execute the same method on android to try to fill the object, it returns null, already debugged and I can go to the method that makes the SELECT in the bank, it brings the right list, filled.. The problem is on the android side, I can not map the result... Anyone can say what can be??!!
Follow the methods:
public List<Produto> getProdutosPromocionais(boolean promocional, double preco) {
return ClienteRest.builder().path("produtos").path("promocionais").path(promocional).path(preco).build().listar(Produto.class);
}
@GET
@Path("/promocionais/{promocional}/{preco}")
@AddLinks
public List<Produto> getProdutosPromocionais(@PathParam("promocional") boolean promocional, @PathParam("preco") double preco) {
return servico.getProdutosPromocionais(promocional, preco);
}
the queries are correct, the URL works, but on the android side returns NULL..
Hello, could you please post the code snippet on which you make the call to your API?
– rsicarelli
posted up there
– Gerson
When you make the same message in the browser, what is the result? Also, how do you make the call on android? Try further to make the problem playable.
– Bruno César
when I call in the browser, brings the right list of objects.. in doInBackground() I try to fill a list using the service method, other methods work, only this one that is returning null
– Gerson
Resourcelinks are necessary if there are children objects?
– Gerson
Maybe the call you make through the Android is returning special characters, which invalidates all return.
– Paulo Rodrigues