title: WCF Cannot Serialize Wrapped Message
body: <p>In short, I try to build a web service consumer with WCF <em>manually</em>; here is the SOAP response:</p>
  
  <pre><code>&lt;s:Body xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;AMethodResponse xmlns="http://v_namespace"&gt;
          &lt;ReturnObjectHeader&gt;
              &lt;Field5&gt;V5&lt;/Field5&gt;
              &lt;Field3&gt;V5&lt;/Field3&gt;
              &lt;Field4&gt;V5&lt;/Field4&gt;
          &lt;/ReturnObjectHeader&gt;
      &lt;/AMethodResponse&gt;
  &lt;/s:Body&gt;
  </code></pre>
  
  <p>Shortly, below is the related part in my C# code (after that I present the trace results):</p>
  
  <pre><code>[System.ServiceModel.MessageContractAttribute(WrapperName = "AMethodResponse", IsWrapped = true, WrapperNamespace = "http://v_namespace")]
  public partial class ReturnObjectWrapper
  {
      private ReturnObject _ReturnObjectHeader;
  
      [System.ServiceModel.MessageBodyMemberAttribute(Name = "ReturnObjectHeader", Namespace = "http://v_namespace")]
      public ReturnObject ReturnObjectHeader
      {
          get { return _ReturnObjectHeader; }
          set { _ReturnObjectHeader = value; }
      }
  }
  
  [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
  public partial class ReturnObject
  {
      private string _Field5;
      private string _Field3;
      private string _Field4;
  
      [System.ServiceModel.MessageBodyMemberAttribute(Name = "Field5", Namespace = "http://v_namespace")]
      public string Field5
      {
          get { return _Field5; }
          set { _Field5 = value; }
      }
  
      [System.ServiceModel.MessageBodyMemberAttribute(Name = "Field3", Namespace = "http://v_namespace")]
      public string Field3
      {
          get { return _Field3; }
          set { _Field3 = value; }
      }
  
      [System.ServiceModel.MessageBodyMemberAttribute(Name = "Field4", Namespace = "http://v_namespace")]
      public string Field4
      {
          get { return _Field4; }
          set { _Field4 = value; }
      }
  }
  </code></pre>
  
  <p>And here is the trace result:</p>
  
  <pre><code>Description: An unrecognized element was encountered in the XML during deserialization which was ignored.
  Element: http://v_namespace:Field5
  NOTE: Same for Field4 and 3
  </code></pre>
  
  <p>What am I doing wrong?</p>