Hi, I have successfully developed and we use it since years, a Binary File Service, based on JAXWS/JAXB, using MTOM to download large binary data. At the service side there is a DataHandler involved which reads the bytes into a byte[] called ImageDepot. (The axis2 MTOM example). The problem is now that the size of this byte array might have become too small. At least I get that impression at the client side, which is a WCF client using a proxy generated by the svcutil asking for the WSDL data from the running SpezplaFS (File Service).
In short: all works fine until at the client the byte[] array becomes too small to keep more 2^31 bytes of data. In short: How can I use MTOM and stream bytes from huge binary files, files with a size up to long.MaxValue, from a service to a client by using a64K byte buffer? The client should be able to call this service, the stub, only once without the need to manage junks. At the client I would see something like BufferdInputStream bis = new BufferedInputStream(new ... what ever stream would talk with my MTOM streaming service ...); BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(datafile)); Byte[] buffer; While (! bis.wead(buffer, 0, Size)== 0) { bos.write(buffer, 0, Size); } If (!bis==null) bis.Close(); If (!bos==null) bos.Close(); And pointers to a working example are very welcome Thank you Josef