C# 在wcf restful服务上打开xml文件并转换为类对象

C# 在wcf restful服务上打开xml文件并转换为类对象,c#,xml,windows-8,C#,Xml,Windows 8,我是wcf restful服务的新手。我想将XML文件从Windows 8应用商店应用程序传递到wcf restful服务,并在服务上打开该文件以保存数据。。。请帮帮我 public async void UPLOADFILE(string zipfile) { StorageFile file1 = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync(zipfile); HttpClien

我是wcf restful服务的新手。我想将XML文件从Windows 8应用商店应用程序传递到wcf restful服务,并在服务上打开该文件以保存数据。。。请帮帮我

public async void UPLOADFILE(string zipfile)
{
    StorageFile file1 = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync(zipfile);
    HttpClient httpClient = new HttpClient();
    MultipartFormDataContent MFDcontent = new MultipartFormDataContent("-WINDOWS8-APP");

    using (IRandomAccessStream writeStream = await file1.OpenAsync(FileAccessMode.ReadWrite))
    {

        Stream stream = writeStream.AsStreamForWrite();
        HttpContent content = new ByteArrayContent(ReadToEnd(stream));
        content.Headers.Add("Content-Disposition", "form-data; name=\"orderFile\"; filename=\"" + zipfile + "\"");
        content.Headers.Add("Content-Type", "application/xml");
        MFDcontent.Add(content);
        string resourceAddress ="http://localhost:33434/Service1.svc/Book/"+zipfile ;
        HttpResponseMessage response = await httpClient.PostAsync(resourceAddress, MFDcontent);

    }
}

我是WCF restful服务的新手,所以我没有任何想法。但我在谷歌上尝试了很多查找完整教程的方法,但没有得到。所以如果你有任何教程,请发送链接给我。谢谢你为什么不从这里开始:谷歌上的第三个结果。。。。stackoverflow.com/questions/19906692/how-to-send-xml-via-post-with-wcfb但我想使用windows 8应用商店传递xml文件…所以windows 8应用商店的任何示例?xml就是xml。无论它来自java、Widows商店应用程序、Android,。。。同样的规则总是适用的。你不能指望我们给你一个完全有效的解决方案,如果你不做最小的努力。。。