title: How to omit xmlns="http://tempuri.org/" from web service output
body: <p>Can you help me how can I omit <code>xmlns="http://tempuri.org/"</code> declaration in each element in my output from asp.net web service (asmx)? </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;ArrayOfData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;DataItem&gt;
      &lt;Id xmlns="http://tempuri.org/"&gt;463d931f-5f14-447d-99cd-289cae2a5b6d&lt;/Id&gt;
      &lt;Created xmlns="http://tempuri.org/"&gt;2012-03-13T13:47:13.8626511+01:00&lt;/Created&gt;
      ...
    &lt;/DataItem&gt;
    ...
  </code></pre>
  
  <p>The web service is defined as follow:</p>
  
  <pre><code>[WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [System.ComponentModel.ToolboxItem(false)]    
  public class DataWebService : System.Web.Services.WebService
  {
  
      [WebMethod]
      public DataCollection GetData()
      {
          ...
      }
  }   
  </code></pre>
  
  <p>Data item is an EF entity:</p>
  
  <pre><code>[EdmEntityTypeAttribute(NamespaceName="DataEntityModel", Name="DataItem")]
  [Serializable()]
  [DataContractAttribute(IsReference=true)]
  public partial class DataItem : EntityObject
  {
  
      [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
      [DataMemberAttribute()]
      public global::System.Guid Id
      {
         ...
      }
  }
  
  
  public class DataItemCollection : Collection&lt;DataItem&gt;
  {
  
  }
  </code></pre>
  
  <p>When I removed <code>[WebService(Namespace = "http://tempuri.org/")]</code> from attributes, the result was the same.</p>