title: SSRS 2005 - XML webservice dataset - parameters not getting passed to webservice
body: <p>I have an SSRS 2005 report which I'd like to use a webservice to retrieve some data. This webservice will take in several parameters.</p>
  
  <p>As a test I set up a very simple demo webservice project on my local environment:</p>
  
  <pre><code>[WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  public class Service : System.Web.Services.WebService
  {
      public Service () {}
  
      [WebMethod]
      public int DivideByTwo(int numberIn) {
          return numberIn/2;
      }   
  }
  </code></pre>
  
  <p>My test report then has a Dataset using an XML datasource, with the (localhost) URL of the webservice in the connection string.</p>
  
  <p>In the query string of the dataset I have the following, based on MS documentation (<a href="http://msdn.microsoft.com/en-us/library/aa964129(SQL.90).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa964129(SQL.90).aspx</a>):</p>
  
  <pre><code>&lt;Query&gt;
      &lt;SoapAction&gt;http://tempuri.org/DivideByTwo&lt;/SoapAction&gt;
      &lt;Method Namespace="http://tempuri.org/" Name="DivideByTwo" /&gt;
      &lt;Parameters&gt;
          &lt;Parameter Name="NumberIn"&gt;
            &lt;DefaultValue&gt;100&lt;/DefaultValue&gt;
          &lt;/Parameter&gt;
      &lt;/Parameters&gt;
      &lt;ElementPath IgnoreNamespaces="True"&gt;*&lt;/ElementPath&gt;
  &lt;/Query&gt;
  </code></pre>
  
  <p>The problem I'm having is that, despite the webservice being triggered, the parameter is not getting passed to the webservice and consequently the return value is always 0. I've debugged the webservice and placed a breakpoint in the DivideByTwo() method, and when the webservice call is triggered from the report and the breakpoint is hit, the numberIn value is always 0 regardless of what I place in the  element of the Query XML.</p>
  
  <p>I've also tried specifying the "NumberIn" parameter in the "Parameters" tab of the Dataset dialog box (with a supplied value) and removing the  element from the query XML - the result is the same.</p>
  
  <p>I've found some posts on the web outlining the same issue but can't seem to find a solution, and have been tearing my hair out for the last couple of hours. Any help would be much appreciated.</p>