2012-03-15 13 views
0

ここにPutコールがあります(注:従来の非Microsoft APIの方法でも同様の結果が得られました)。HTTP PUT中にオブジェクトにデータが失われる

response = httpClient.Put(uriTemplate, contentType, CreateContentFromObject(obj)); 

それから私は、次のことを示して終わるサービスにデバッグ: enter image description here

ここに私のオブジェクトここ

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")] 
[System.Diagnostics.DebuggerStepThroughAttribute()] 
[System.Xml.Serialization.XmlTypeAttribute(TypeName = "Dog", AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/DowCorning.BusinessObjects")] 
[System.Xml.Serialization.XmlRootAttribute(DataType = "Dog", Namespace = "http://schemas.datacontract.org/2004/07/DowCorning.BusinessObjects", IsNullable = false)] 
public class Dog 
{ 
    public string FurColor { get; set; } 
    public int Weight { get; set; } 
    public string Temperment { get; set; } 
    public string Tricks { get; set; } 
    public string Breed { get; set; } 
} 

が私の契約

 [OperationContract(Name = "http://www.company.com/dog")] 
    [WebInvoke(ResponseFormat = WebMessageFormat.Xml, UriTemplate = "dog", Method = "PUT")] 
    Dog Doggy(Dog updateDog); 

がすべてのヘルプですなぜデータの損失が発生しているのかを把握するにはgr食べることができます。

注:私はシオマネキてPUTを実行した場合、何も問題はありません...

答えて

0

これは、シリアル化の問題

だった私は、[受注]は私のデータメンバに属性を利用し、これは私の問題を解決しました。

関連する問題