streaming large xml responses to the client
I have the requirement of being able to stream large xml responses to the some clients. The XML is generated in the database and I can retrieve it as an ASCII Stream but we don't want to force the application server to keep the entire document in memory so instead we want to feed the stream out through the soap response. What is the recommended way to populate the soap response with a stream?
I see that if I implement the MessageEndpoint interface I can get a handle on the MessageContext object which has the method messageContext.readResponse(InputStream). Do I need to wrap the xml response from the database in the <SOAP-ENV> tags before sending out the stream
If anyone has an example of something similar it would be apprieciated.