----- Original Message ----- From: "Praveen Peddi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 11:32 AM Subject: Re: Sending response as stream
> Does it mean that attachments are sent as streams and not part of soap > envelop? They are not part of the SOAP envelope. As such, they are not parsed into a DOM on the receiving end. At both ends, however, Apache SOAP will put them in memory. TransportMessage#save writes the full HTTP body to a ByteArrayOutputStream, and the TransportMessage contructor that reads from an InputStream reads an entire HTTP body into a byte array. Apache Axis, on the other hand, streams attachments directly to the HTTP stream without creating an intermediate in-memory image. > I think my problem here is the memory and time. So If I send it as > attachment, the client can read the stream and may be save it to disk rather > than filling the memory? A non-Apache SOAP client might be able to truly minimize memory, but an Apache SOAP client would still read the full attachment into memory. As I said above, though, it would not parse it into a DOM, which is itself a big savings. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists.