I had problems with this using 1.1. I don't know if 1.2 helps the issue, but after looking through the source of 1.1 (and 1.2 a month ago) the http AxisServlet seems to convert the
response message to a String or byte array before it returns the message rather than streaming it out while it serializes the response.


I didn't have any luck setting the streaming=on attribute in the WSDD as suggested by the FAQ in either 1.1 or 1.2 whereby I was hoping that Axis wouldn't buffer the response and I could uses custom serialization handlers and the SerializationContext to emit/flush out the large amount of data to the SerializationContext while the response was built.

Ultimately I the edited AxisServlet and SOAPPart classes having followed the calls starting at the bottom of the AxisServlet doPost method where the HTTPServlet response OutputStream is used. Basically I got to the place in SOAPPart where the String response was sent out and sent out my own response. I think I may have modified the Message class as well so that it didn't use any buffered streams. It was a relatively minor modification.

I found the downside of the modification is that clients may/may not be able to handle a large amount of data that they receive in a response message; however it is really the client's responsibility to handle it, not the server's, and the modifications seem to protect against/prevent out of memory crashes on the server.

Using attachments is definitely cleaner and the clients do not have issues receiving large amounts of data as long as they support attachments. One reason that we went ahead with our modification was that we want to offer clients both options (attachments or data in the body of the response). We felt that without the streaming of this payload chunk of data in the response body, if we have a large number of clients simultaneously requesting a medium amount of data that they can handle themselves, we could potentially run out of memory on the server anyway.

If anyone has done something else that they found to work I would be interested in it hearing about it. We were in a hurry to deal with this issue and implemented it over a couple of days so we may have missed an option when we researched ways of dealing with it.

Thanks,
Charles

Galbreath, Mark A wrote:

I don't see the problem with larde data...seems to me the soap would flush
it out.  Are you scrubbing the data hard enough?

Mark






Reply via email to