Hi,

I am encountering a problem when using Attachments under Axis 1.2.1. 

I am interacting with an (axis) web service using a simple axis-based client 
(not an automatically generated stub). I want to use client-side and
service-side handlers to attach a relatively large InputStream to a client
request. The InputStream is not a FileInputStream. 

(i) If I use the setContent method of AttachmentPart, things work fine for
InputStreams shorter than 16KB. For longer streams the attachment
arrives at the service corrupted and truncated. 

(ii) If I include the InputStream in a DataSource + DataHandler
and use the setDataHandler method of AttachmentPart instead, 
the client appears to hang.
 
Interestingly enough (ii) works fine when trying to attach a stream 
to a service response on the service side. This procedure seems to 
work on the client as well, if the stream is a FileInputStream 
(i.e. the attachment is loaded from a file).

Could (i) be originating from a bug in the ManagedMemoryDataSource
class? Does anyone know if I am missing out something obvious when 
using DataHandlers (ii)? Did anyone experience similar problems?

Cheers
Federico  

Reply via email to