web services - .NET WebService Sending Large XML File -


I have a list of the object list that I need to send a web service There are approximately 37,000 objects in the list. It translates a 125 MB XML file, if I do it serial in XML.

I think communication through the XML is serialized from default web services. This makes me believe that I'm actually sending 125MB files every time. In binary format it will be about 5 MB only, what is the way to create web service calls in binary format to avoid big bandwidth hits?

Do you use WCF for your webservice? If so: WCF support across the wire.

If you have a compression opportunity that sends data to the server or 5 MB in some, then you can definitely stream in your client.

As for your WCF service agreement:

  [service function (namespace = "http://yourservice.com/streaming/2009/12")] Interface IYourStreamingService {[OperationContract] stream GetListOfObjects (Int id); }  

You can define the methods that can either take or return data in the form of "stream", and the client then returns that stream to FileStream Or memorystream, , and data will be streamed on the stars in the wires, so you will not need to allocate the entire data in memory before sending it to the client.

Mark


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -