首页 > 解决方案 > 在 Java Web 应用程序中集成 SSRS 2016 报告需要帮助

问题描述

我们正在SQL Server从迁移2008R22016. 我们使用exe文件来访问SSRS使用文件的报告ReportExecution2005.asmx?wsdl

迁移后,我们在尝试使用C#.net程序读取报告时收到以下错误。

Unhandled Exception: System.InvalidOperationException: Client found response content type of 'text/html; charset=UTF-8', but expected 'text/xml'.
The request failed with the error message:

   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at getMaPSStartpage.ReportService2008.ReportExecutionService.LoadReport(String Report, String HistoryID)
   at getMaPSStartpage.Program.Main(String[] args)

谢谢!!拉贾塞卡

标签: javasql-serverreporting-services

解决方案


SSRS Web 服务正在返回一条错误消息,该错误采用 text/html 的形式。很可能是权限问题。但是,您可以使用 fiddler 来捕获整个 HTML 内容并查看确切的错误消息。

首先,尝试在浏览器中导航到 SSRS 报告服务 URL。通常是http://<reportservername>/reportserver. 然后执行其中一份报告。如果成功,则可能是您的 C# 应用程序在特权较低的帐户下运行。


推荐阅读