Saturday, February 25, 2012

2005 SQL Reporting Service XML Data Source (WebService)

Does anyone know how to ensure a WebService/WebMethod needs to be serialized to ensure is compatible with Reporting Services' new XML Data Source when passing parameters to the report. I have had success on using the Report Server WebService
http://localhost/reportserver/reportservice2005.asmx
and using the Query designer to pass the SoapAction call
<Query><SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren</SoapAction></Query>
and associating the data set parameters to the Designer GUI parameters (which I may say is not documented well on BoL)


But when using ANY OTHER WEB SERVICE that needs parameters, the parameteres are not passed correctly to the WebMehtod, so I am thiking they are comming in the header or as an array instead of an actual item within the SOAP message.... To bad we can't do this in the Query Designer... it is actually SAD this was nto thought out as to be compatible with regular SOAP calls... too bad. Ideally we would use query like the one below, and replace the fixed values with a parameter as defined in the designer (i.e. /Reports = @.ItemParam & False as @.RecursiveParam )... maybe in Orca this can be done right! either thru SOAP

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ListChildren xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">
<Item>/</Item>
<Recursive>false</Recursive>
</ListChildren>
</soap:Body>
</soap:Envelope>

Or through whatever "standard' the <Query/> definition is made off!

<Query>
<SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren
</SoapAction>
<Parameter>
<Name>Item</Name>
<Value>/Reports</Value>
</Parameter>
<Parameter>
<Name>Recursive</Name>
<Value>False</Value>
</Parameter>
</Query>

Yes, the docs are very sketchy. And there may be bugs in the provider. But I can get some web services to work. I posted an example of one that does in my blog: http://blogs.msdn.com/bwelcker/archive/2005/11/13/492296.aspx.

|||Regretfully that web service returns data even if there are blanks in the parameters, so is not a real good exception to test this bug|||

I have been trying to get this to work as well. Like you I am having problems with the paramters. I was just wondering if you figured out the magic trick to get the report designer to pass the paramters. Thanks Shawn.

|||I've got Microsoft working on it! I have an incident in the Beta site and on BetaServices.com.
I will post here once they get this bug resolved...|||Thanks!

No comments:

Post a Comment