users@jersey.java.net

[Jersey] Android and jersey problem

From: Airton Pereira <faps_at_cin.ufpe.br>
Date: Fri, 5 Aug 2011 00:16:49 -0300

Friends,

I'm trying to use a client REST with Android but it happens a
NullPointerException at the piece of code below (line 4), do you know what
to do?:

1 WebResource content = Client.create().resource(getBaseURI());
2 ClientResponse clientResponse = null;
3 FileInputStream fis = new FileInputStream(file);
4 Builder type = content.path("/backup/save/nomearquivo?l=" + length).type(
5 javax.ws.rs.core.MediaType.TEXT_HTML_TYPE );
6 clientResponse = type.put(ClientResponse.class,fis);





Thanks,
Airton Pereira
http://airtonpereira.webnode.com.br/