From: Jérémy C. <jer...@gm...> - 2010-03-30 13:55:44
|
Hello, I have a communication problem between android and eXist. I need to send information/file from android to eXist. My terminal in Android should be able to submit files of type XML to eXist database. I'm using android in VPN. I tried using the PUT&GET method of HTTP (i think GET&PUT method are aviable with eXIst, see=>http://exist.sourceforge.net/devguide_rest.htm ): private static String url = "http://localhost:8080/exist/rest/db/"; HttpClient httpclient = new DefaultHttpClient (); HttpPut httpput = new HttpPut (url); try ( httpput.setEntity (new StringEntity ( "<the goes here> xml")); httpput.setHeader ( "Content-Type", "text / xml"); HttpResponse response; response = httpclient.execute (httpput); ) Catch (ClientProtocolException e) ( e.printStackTrace (); ) Catch (IOException e) ( e.printStackTrace (); ) I get no result and no error in compilation or execution. I therefore ask you one example of Java code, or if an explanation of the "right way" to use. Thanks you for your help |