title: How to use ReportingService2010?
body: <p>I'm trying to deploy a reporting server solution by code using the reporting server web service: <a href="http://_Server_Name_/ReportServer/ReportService2010.asmx?wsdl" rel="noreferrer">http://_Server_Name_/ReportServer/ReportService2010.asmx?wsdl</a>. </p>
  
  <p>Sadly I can't find any examples online. Only some vague information from <a href="http://msdn.microsoft.com/en-us/library/ms155071.aspx" rel="noreferrer">MSDN</a>.</p>
  
  <p>when publishing through the Business Intelligence Development Studio, it publish the shared data source and then publish the reports. I'm trying to so something similar on C#:</p>
  
  <pre><code>var service = new ReportingService2010();
  service.Credentials = new NetworkCredential(username, password, domain);
  
  foreach(var dataSourcePath in GetDataSources()) {
      string name = Path.GetFileNameWithoutExtension(dataSourcePath);
      Byte[] content = GetFileContent(dataSourcePath);
      service.CreateCatalogItem("DataSource", name, parent, true, content, null, out warnings);
  }
  </code></pre>
  
  <p>But the CreateCatalogItem gives me the following SoapException exception:</p>
  
  <blockquote>
    <p>The input XML does not conform to the
    schema. XML grammar is described in
    the API documentation. For XML in
    reports, refer to Report Definition
    Language syntax. --->
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidXmlException:
    The input XML does not conform to the
    schema. XML grammar is described in
    the API documentation. For XML in
    reports, refer to Report Definition
    Language syntax.</p>
  </blockquote>
  
  <p>Is there something I'm doing wrong or any other approach I should take?</p>