title: XML De-serialization giving null WCF Objects
body: <p>I am having an XML string like</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;FullServiceAddressCorrectionDelivery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;AuthenticationInfo xmlns="http://www.usps.com/postalone/services/UserAuthenticationSchema"&gt;
      &lt;UserId xmlns=""&gt;FAPushService&lt;/UserId&gt;
      &lt;UserPassword xmlns=""&gt;Password4Now&lt;/UserPassword&gt;
    &lt;/AuthenticationInfo&gt;
  &lt;/FullServiceAddressCorrectionDelivery&gt;
  </code></pre>
  
  <p>In Order to map the nodes with Class, i am having the class structure in WCF like</p>
  
  <pre><code>[DataContract]
  [Serializable]
  public class FullServiceAddressCorrectionDelivery
  {
      [XmlElement("AuthenticationInfo", Namespace = "http://www.usps.com/postalone/services/UserAuthenticationSchema")]
      [DataMember]
      public AuthenticationInfo AuthenticationInfo { get; set; }
  }
  
  [DataContract]
  [Serializable]
  public class AuthenticationInfo
  {
      [DataMember]
      [XmlElement("UserId", Namespace = "")]
      public string UserId { get; set; }
  
      [DataMember]
      [XmlElement("UserPassword", Namespace = "")]
      public string UserPassword { get; set; }
  }
  </code></pre>
  
  <p>For De-serialization , i used xmlserializer to De-serialize the object</p>
  
  <pre><code>XmlSerializer xs = new XmlSerializer(typeof(FullServiceAddressCorrectionDelivery));
  var result = (FullServiceAddressCorrectionDelivery)xs.Deserialize(stream);
  </code></pre>
  
  <p>this method returned me a Null FullServiceAddressCorrectionDelivery object..
  but when i used DataContractSerializer .. like</p>
  
  <pre><code>DataContractSerializer xs = new DataContractSerializer(typeof(FullServiceAddressCorrectionDelivery));
  var result = (FullServiceAddressCorrectionDelivery)xs.ReadObject(stream);
  </code></pre>
  
  <p>then following exception came out..</p>
  
  <p>Error in line 2 position 46. Expecting element 'FullServiceAddressCorrectionDelivery' from namespace 'http://schemas.datacontract.org/2004/07/WcfService1'.. Encountered 'Element'  with name 'FullServiceAddressCorrectionDelivery', namespace ''.</p>
  
  <p>i am stuck with this...
  i somehow with the help of RENE(StackOverFlow member) succeded to deserialize if the class was in same project .. but when i converted them to WCF Datacontracts.. i came across that issue ..... please guide me where i am doing wrong here... </p>