SSRS 2008 - reportservices.asmx 与旧版应用程序不兼容
我们获得了大约 2003 年编写的应用程序。该应用程序的一部分使用 SQL Server Reporting Services 来生成 PDF 报告。基本上,在应用程序中,用户单击按钮,修改参数(开始/结束日期),然后以 PDF 格式传回报告(我认为)以便可以打印。伟大的。在 SQL 2005 中运行良好。
然而,SQL 2008 完全是另一头野兽。我可以从网络界面(http://127.0.0.1/reports/...)运行相同的报告。但网址不起作用。我仔细研究了一下,发现该应用程序正在向 127.0.0.1/reportserver/reportservice.asmx 发送调用。现在它返回一个空字符串而不是 XML 文档。
据说有一个名为 reportserver/reportexecution2005.asmx 的 2005 兼容版本,但它会生成一个奇怪的 SOAP 错误。 “System.Web.Services.Protocols.SoapException:服务器无法识别 HTTP 标头 SOAPAction 的值:http://schemas.microsoft.com/sqlserver/2003/12/reportingservices/Render。 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouterRequest() ....
我现在注意到,当我尝试使用 Internet Explorer 并浏览到 127.0.0.1/reportserver/reportservice.asmx 时,我收到登录提示,而这不是SSRS 2005 的情况。我还注意到,如果我浏览到 reportserver/reportexecution2005.asmx 它会返回一个 XML页面看起来与 SSRS 2005 中返回的内容基本相似
。很明显,我错过了一些东西,因为该应用程序是不久前创建的,所以我应该使用 SQL2000 版本,即 127.0.0.1/reportserver/reportservice.asmx。我想现在有一个身份验证错误。
有人有什么想法吗?
我们没有应用程序的源代码,但我可以修改连接参数,就像我可以要求它查询 ReportServiceXXX.asmx 而不是 ReportService.asmx
We have acquired an application that was written approximately 2003. Part of the app uses SQL Server Reporting Services to generate PDFs of reports. Basically within the app a user clicks a button, modifies parameters (start/end date) and a report is passed back (i think) in PDF format so that it can be printed. Great. Works fine in SQL 2005.
However, SQL 2008 is another beast entirely. I can run the same report from the web interface (http://127.0.0.1/reports/...). But the URL doesn't work. I dug around and found that the app is sending a call to 127.0.0.1/reportserver/reportservice.asmx. Now it returns an empty string instead of the XML document.
Supposedly there is a 2005 compatible version called reportserver/reportexecution2005.asmx but that generates a whacky SOAP error. "System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2003/12/reportingservices/Render. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouterRequest() ....
I notice now when I try to use internet explorer and browse to 127.0.0.1/reportserver/reportservice.asmx i get a login prompt, whereas that was not the case with SSRS 2005. I also notice that if I browse to reportserver/reportexecution2005.asmx it returns a XML page which seems mostly similar to what was returned in SSRS 2005.
So obviously I am missing something. I think since the app was created a while ago I should be using the SQL2000 version which is 127.0.0.1/reportserver/reportservice.asmx. But I think now there is an authentication error.
Anyway. I'm clueless. Anyone have any thoughts? Thanks.
We don't have the source code to the app, but I can modify the connection parameters, like I can ask it to query for ReportServiceXXX.asmx instead of ReportService.asmx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你已经很接近看到问题了。如果仔细查看 ReportExecution2005.asmx 中的 XML,您会发现它位于 Soap12 中。您的错误消息显示使用方法 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouterRequest 进行了调用,该方法正在发送 Soap11 消息。我有同样的问题,但还没有解决。
我的两个选择是添加到 SQL 2008 报表服务的绑定以接受 Soap11 或修改我的代码以发送 Soap12。我希望在 SQL Server 中进行简单的配置更改,但尚未找到。
You are very close to seeing the problem. If you look closely at the XML from ReportExecution2005.asmx you will see that it is in Soap12. Your error message shows that a call was made using method System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouterRequest, which is sending a Soap11 message. I am having the same problem, but have not solved it yet.
My two options are to either add a binding to SQL 2008 report service to accept Soap11 or modify my code to send Soap12. I am hoping for a simple config change in SQL server, but have not found it yet.