users@jersey.java.net

How can I post an array of File to a web server?

From: danny888 <danny.chan_at_cbsa-asfc.gc.ca>
Date: Fri, 16 Jul 2010 07:41:49 -0700 (PDT)

Hi,

In my Jersey client:

      File templateXsl = new File("c:\\sasmple.xsl");
      File dataObjectXml = new File("c:\\sample.xml");
      File [] xmlFileArr = new File[2];
      xmlFileArr[0] = templateXsl;
      xmlFileArr[1] = dataObjectXml;
      response =
resource.type(MediaType.APPLICATION_XML_TYPE).post(String.class,
xmlFileArr);

I got the following error:
A message body writer for Java type, class [Ljava.io.File;, and MIME media
type, application/xml, was not found

I am not sure if I am in the right direction. If not, any other way to post
an array of File? Your help would be highly appreciated.

Thanks
danny
-- 
View this message in context: http://jersey.576304.n2.nabble.com/How-can-I-post-an-array-of-File-to-a-web-server-tp5302224p5302224.html
Sent from the Jersey mailing list archive at Nabble.com.