I know this isn't very elegant but you could investigate creating a soap class that will serialize the data then utilise the java.util.zip package to compress this before transmitting via soap. Obviously you'll will need to create you're own custom deserializer for the soap client but there are many zip utilities available if for instance your client is a vb.
-----Original Message----- From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: 19 December 2003 16:32 To: [EMAIL PROTECTED] Subject: Re: Sending response as stream Hello all, Is there a way a method in a soap service can return an object (java.util.List) as attachment with out using soap specific classes. I was looking at the mime example in soap samples and it was using ByteArrayDatasource which is soap specific class. The example I saw looked like this: DataSource ds = new ByteArrayDataSource(new File(fname[i]), null); I think my question probably is "Is there any way to build a DataHandler object w/o using apache soap tool on the server side?" I am trying send the java.util.List as an attachment. the list has strings in it. The reason I want to send it as attachment is because the list has 1000s of strings and sending it as List will fillup the soap envelop and putting overhead of parsing the huge xml which in turn is filling up all my memory with the parsed document. If I send the same list as an attchment, I am assuming that I will not have this problem. The size of the list itself is not a problem I think. Its the size of the soap envelop thats killing the app. Am I right? The reason I do not want to use soap specific classes is because our soap services are plain java classes and designed such a way that we can swith to any soap tool in the future. Thanks. Praveen ----- Original Message ----- From: "Martin Gainty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 17, 2003 1:15 AM Subject: Re: Sending response as stream > Read this > http://www.w3.org/2000/xp/Group/2/07/SOAP-AF/aftf-soap-af.html > Regards, > Martin > ----- 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? > > > > 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? > > > > Praveen > > > > ----- Original Message ----- > > From: "Scott Nichol" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, December 16, 2003 10:54 AM > > Subject: Re: Sending response as stream > > > > > > Attachments are the one way I can think of to minimize the processing > Apache > > SOAP will do. > > > > 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. > > ----- Original Message ----- > > From: "Praveen Peddi" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, December 16, 2003 10:30 AM > > Subject: Sending response as stream > > > > > > HI all, > > We are using apache soap both on serverside and on client side. > > I am trying to write a method in soap service that returns thousands of > > objects that are converted into xml elements. Returning the whole response > > as an xml string is taking for ever. I am wondering if I can send the > > response as an output stream rather than as xml string. > > > > How about sending the response as attachment. Will it do any better. I > think > > attachments are sent as streams if I am not wrong. > > > > Thanks > > Praveen > > > > >