Streaming SOAP response

N

nano2k

Hi

My webservice (using .NET 1.1) needs to send back huge amunts of data.
The data is fetched from a MS SQL database then it is transformed in
XML format and sent back to the requesting client.
The problem is that some requests, like complex reports return back to
the client huge data chunks. On some systems, this leads to "Out of
memory" exceptions.

I know that the communication between client/server using SOAP
protocol is in a request/response fashion, but is there a way to
stream the response to the client?

That is, say I need to return 100.000 records.
I should use a data reader to fetch them one by one from the database,
pack it as part of an XML response and send the data to the client.
This way, the buffers that store the response won't be huge on the
server side.

I am willing to "port" the applications to version 2.0 or higher of
the .NET framework if a solution exists there.

Just a shot in the dark.
Thanks.
 
N

nano2k

Hi

My webservice (using .NET 1.1) needs to send back huge amunts of data.
The data is fetched from a MS SQL database  then it is transformed in
XML format and sent back to the requesting client.
The problem is that some requests, like complex reports return back to
the client huge data chunks. On some systems, this leads to "Out of
memory" exceptions.

I know that the communication between client/server using SOAP
protocol is in a request/response fashion, but is there a way to
stream the response to the client?

That is, say I need to return 100.000 records.
I should use a data reader to fetch them one by one from the database,
pack it as part of an XML response and send the data to the client.
This way, the buffers that store the response won't be huge on the
server side.

I am willing to "port" the applications to version 2.0 or higher of
the .NET framework if a solution exists there.

Just a shot in the dark.
Thanks.

Possible solution: streaming the response temporarily on the server in
a file and sending it back as a DIME attachment.
Pro/cons exists.

Are there other methods?

Thanks.
 
J

John Saunders

Have you considered using WCF? Any new development should use WCF in any
case, but it certainly has a better streaming story than ASMX does.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top