SSRS Report Consuming RESTful Web Service
Asked Answered
M

0

6

I am trying to consume an XML via a REST web service using SSRS. I am intending to create the XML using LINQ and then dump it at the web service location.

The web service is held in Azure under

https:// ... azurewebsites.net/api/simpleXmlData?name=Test

In the report, I have created a data source with the type XML and the connection string as the above, with the parameter determined separately like below.

"https:// ... azurewebsites.net/api/simpleXmlData?name=" & Parameters!Id.Value

I have then created a dataset, which attempts to call it using the method XML query type: XML query type.

<Query>
   <Method Name="Club" 
Namespace="http://schemas.microsoft.com/2003/10/Serialization/">
   <Parameters>
       <Parameter Name="Item">
           <DefaultValue>/</DefaultValue>
       </Parameter>
   </Parameters>
   </Method>
   <ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>

However, when I debug the report, upon opening I get this error.

I am new to this and have read up as much as I can, mainly basing the report on what I've seen below:

We prefer to use REST over SOAP as the latter appears to be more time consuming to use.

Is there a solution to this or is REST still not supported by Reporting Services?

Mccaffrey answered 15/2, 2018 at 10:15 Comment(1)
I know this is old, but for anyone else who finds their way here, I was able to get this to work according to the examples in the first link above. One 'gotcha' in that documentation though is this part: "XML content can also be accessed directly from a URL. Notice that only the HTTP protocol is supported and the request uses the GET method. However, if parameters are specified, the POST method will be used." Not exactly RESTful by strict standards, but after changing my API method to a POST, the report worked.Adversaria

© 2022 - 2024 — McMap. All rights reserved.