There is surprisingly very little information on the web on how to call webservices from SSRS. So here is a quick list of stuff that I found out:
Note: I am using WCF webservices for what I was doing (shouldn’t matter if you are using some other kind of service, as long as it’s a SOAP service).
Note 2: Use something like Fiddler to inspect the traffic to figure out what the request is going out as. It can be useful to figure out why a call is erroring out.
- Create a new data-source.
- Choose “Use a connection embedded in my report”
- Set the “connection type” as xml
- Enter the url to the webservice (eg: http://myserver/ssrsTest.svc)
- Right click on the data-source and select add “DataSet”
- Select “Use a dataset embedded in my report”
- Open the query designer and build your query in there.
- Here is what a query looks like to call a method named test that takes no parameters:
- Here is what a query looks like to call a method named testWithParameters that takes one parameter
The namespaces were found by looking at the WSDL (target namespace defines the namespace)
<soap:operation soapAction="http://tempuri.org/ITestService/Test" style="document"/>
<Method Name="testWithParameters " Namespace="http://tempuri.org/">