On the wire, that blob has to travel as a MIME part. And there might be several such MIME parts. Unless you traffic in interceptors, as far as I know, the entire content will be pulled into memory, unless it's very big, in which case it ends up in a temp file. CXF can't just leave the socket that the data is arriving on sitting there waiting for you to read the stream on the data handler.
2010/10/8 Jimi Hullegård <[email protected]>: > Hi, > > I have set up a simple webservice for testing, where the object to transfer > contains a bunch of simple fields, and then a DataHandler for some binary > data (a Blob, actually). It works just fine, and some test with large files > (500MB) proved to me that it really works without having the entire data in > memory on the server or on the client. > > But then I realised that in most use cases, we will not need this binary > data, so on the client side we will not read from the InputStream of the > DataHandler. But can that cause any problem? Because when I think about it I > don't really know how CXF handles this DataHandler. Maybe it assumes that the > entire content of the DataHandler InputStream will be sent, and that it keeps > the connection open until the client has finished reading, or until some > timeout. Or maybe it assumes the opposite, that it can close the connection > after it has transfered the "normal" data, and then open a new connection if > the client starts to read from the InputStream of the DataHandler. > > If it is something like the first scenario, that what can I do to transfer > this object the right way, without having to read the InputStream? I can't > find any information about this in the documentation. > > Regards > /Jimi
