title: Populating ANY elements on a web service in C#
body: <p>Can someone point me to a C# example where they populate a request and receive the response for a web service where the schema is mostly implemented as ANY elements?  </p>
  
  <p>I have added a web service reference to my project.  The WSDL/schema for the web service has most of the body of the service request and response as an 'ANY' element.  I know the underlying schema based on implementing a client to this web service request in Java.  Thanks in advance for help. </p>
  
  <pre><code>ServiceGenericRequest_Type requestBody = &lt;init&gt;
  GenericRequestData_Type genericRequest = &lt;init&gt;;
  
  // here is where the ANY element starts
  genericRequest.Any = new System.Xml.XmlElement[1];
  
  // receive error that I can not create abstract type
  System.Xml.XmlNode inqNode = new System.Xml.XmlNode();
  
  genericRequest.Any[0].AppendChild(inqNode);`
  </code></pre>