title: "System.Xml.XmlAttribute cannot be used as: 'xml element'." while running my asmx service
body: <p>I am trying to create a small asmx service with a method which will return some dummy data. I get the following error when I run the service:
  "System.InvalidOperationException: System.Xml.XmlAttribute cannot be used as: 'xml element'."</p>
  
  <p>My web method is as follows:</p>
  
  <pre><code>[WebMethod]
  public SubmitCaseRequestResponse1 SubmitCaseRequest(SubmitCaseRequestRequest1 request)
  {
  
      var response = new SubmitCaseRequestResponse1
      {
          ResponseID = "456325898",
          Success = true,
          ValidationErrors = null
  
      };
      return response;
  }
  </code></pre>
  
  <p>My SubmitCaseRequestResponse1  class:</p>
  
  <pre><code>public class SubmitCaseRequestResponse1
  </code></pre>
  
  <p>{
      public string ResponseId { get; set; }</p>
  
  <pre><code>public bool Success { get; set; }
  
  public ValidationError[] ValidationErrors { get; set; }
  </code></pre>
  
  <p>}</p>
  
  <p>and the request class is :</p>
  
  <pre><code>public class SubmitCaseRequestRequest1
  </code></pre>
  
  <p>{
      public AuthHeader AuthHeader { get; set; }</p>
  
  <pre><code>public SubmitCaseRequestRequest PostCaseDateRequest { get; set; }
  </code></pre>
  
  <p>}</p>