| Author: Anuraj 05 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Here is some code to upload a file to webservice
http://www.dotnetthoughts.net/2009/07/28/uploading-files-using-webservice/
You can use the same approach for downloading also.
Thanks Anuraj THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS. BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT. dotnetthoghts
|
| Author: Hari 05 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi
I am assuming that your upload and download functionality is working fine and you are only convered with getting the xml from a memory stream. You can use the following code. But beware it work only if the memory stream canbe coverted toa proper xml. You modify this code suit your needs.
BufferedStream stream = new BufferedStream(new MemoryStream()); stream.Write(Encoding.ASCII.GetBytes("<xml>foo</xml>"), 0, "<xml>foo</xml>".Length); stream.Seek(0, SeekOrigin.Begin); StreamReader sr = new StreamReader(stream); XmlReader reader = XmlReader.Create(sr); while (reader.Read()) { Console.WriteLine(reader.Value); } stream.Close();
|
| Author: Prajeesh 05 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi Raveena,
See following article, it will help you http://aspalliance.com/404_Image_Web_Service_
|