- From: Claus <filter@privat.dk>
- Date: Wed, 31 Jul 2002 03:27:43 -0400 (EDT)
- To: <www-annotation@w3.org>
Hi guys, I am trying to delete an annotation from Java with no luck. The server returns a HTTP 500 error. I know that my code is wrong because I can easily delete annotations from Amaya. (The web-interface also fails) there are no reply's to the annotation. Does anyone know what is wrong? String annotation = "http://annotest.w3.org/annotations/Annotation/1028082170.43327"; String ai = "username:password"; String authinfo = new sun.misc.BASE64Encoder().encode(ai.getBytes()); URL url = new URL(annotation); HttpURLConnection huc = (HttpURLConnection)url.openConnection(); huc.setRequestMethod("DELETE"); huc.setRequestProperty("Authorization","Basic "+authinfo); huc.setRequestProperty("Accept","text/xml"); InputStream is = huc.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line = ""; while ((line = br.readLine())!=null) { System.out.println(line); } br.close(); /Claus
Received on Thursday, 8 August 2002 14:19:33 UTC