Hello,

Does anyone have any experience with this. I am not able to do a POST of the query file using Jersey. The server keeps throwing 500.
Code below:

{
   ClientConfig config = new DefaultClientConfig();
       Client client = Client.create(config);
       client.addFilter(new LoggingFilter());
       System.out.println("test");
       WebResource service = client.resource(getBaseURI());
       File f = new File("/home/monika/post.xml");
       System.out.println(f.exists());
String response=service.type(MediaType.TEXT_XML).accept(MediaType.TEXT_XML).post(String.class,f);
       System.out.println(response.toString());
   }

   private static URI getBaseURI() {
       return UriBuilder.fromUri(
               "http://lod.openlinksw.com/fct/service";).build();
   }
// curl -H "Content-Type: text/xml" -d @post.xml

}


Monika



Reply via email to