Returning data from web service piece-by-piece
-
Sup guys. I'm 99% sure this is impossible but my boss keeps asking me about it so I've been researching but to no avail. I really need to verify whether it's possible or not so here goes: I have a webservice which returns a LOT of data in a list of a complex object. Is it even possible to have the webservice push returns? For example: The webservice loops all objects and does something awesome with each. When it finishes with each object it adds it to the final list. How possible is it to push the objects to the front one at a time? Thanks guys.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
-
Sup guys. I'm 99% sure this is impossible but my boss keeps asking me about it so I've been researching but to no avail. I really need to verify whether it's possible or not so here goes: I have a webservice which returns a LOT of data in a list of a complex object. Is it even possible to have the webservice push returns? For example: The webservice loops all objects and does something awesome with each. When it finishes with each object it adds it to the final list. How possible is it to push the objects to the front one at a time? Thanks guys.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
I don’t know whether it will solve your purpose but think about a reverse way. Like suppose you have a large dataset to be returned from webservice. Use a thread in your class to fetch data page by page. Ask your webservice to return the first page. After the first page returned raise a event to your UI to represent the data and then ask your web service to fetch the next data page. However it all depends your requirement.
-
I don’t know whether it will solve your purpose but think about a reverse way. Like suppose you have a large dataset to be returned from webservice. Use a thread in your class to fetch data page by page. Ask your webservice to return the first page. After the first page returned raise a event to your UI to represent the data and then ask your web service to fetch the next data page. However it all depends your requirement.
-
Sup guys. I'm 99% sure this is impossible but my boss keeps asking me about it so I've been researching but to no avail. I really need to verify whether it's possible or not so here goes: I have a webservice which returns a LOT of data in a list of a complex object. Is it even possible to have the webservice push returns? For example: The webservice loops all objects and does something awesome with each. When it finishes with each object it adds it to the final list. How possible is it to push the objects to the front one at a time? Thanks guys.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
I don't think it's possible through webserice.Connecting through webservice is stateless, ie you can not get multiple response from single request. So why dont you make multiple request to service ie for every object, there is one request. But obiously this is not good approach.
Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overhead