Due to the problems with lost memory using base 64 encoded images in services yesterday I tried today to use attachments. It works fine if I attach files (tif images) with file size not greater than 11-12 MB. Files with sizes greater than 12MB were not written from the server service. Are the any limitations for the filesize or any possible solutions for files with 20, 30 or more MB.

 

My datahandler in the service client:

 

params.addElement (new Parameter("name", String.class, "hallo", null));

DataSource ds = new ByteArrayDataSource(new File("c /21.tif"),null);

DataHandler dh = new DataHandler(ds);

params.addElement(new Parameter("image",javax.activation.DataHandler.class, dh, null));

 

The service :

 

DataSource ds = dh.getDataSource();

ByteArrayDataSource bds = new ByteArrayDataSource(ds.getInputStream(),dh.getContentType());

            FileOutputStream fos = new FileOutputStream("/var/redweb/test.tif");

            bds.writeTo(fos);

 

 

Thanks Markus

Reply via email to