来自 Java 的 Reporting Services WS - 获取 (401) 未经授权
我们正在编写一个 Web 应用程序,尝试使用对 Reporting Services SOAP API 的调用来替换所有 ReportManager 功能。
我们开始使用 SSRS 2008,并且我们的 Java 代码可以正常工作。 此后我们不得不降级到 SSRS 2005,现在我们在连接到服务器以获取可用报告列表时遇到问题。
我们进行以下调用:
catalog = _reportingService.listChildren(_reportCredentials.getFolder(), false);
它返回异常 - (401)Unauthorized
_reportCredentials 仅保存属性文件中的信息(如要使用的文件夹、用户名和密码等)。 _reportService 定义为:
private ReportingService2005Soap _reportingService;
...
_reportingServiceLocator = new ReportingService2005Locator(); _reportingServiceLocator.setReportingService2005SoapEndpointAddress(soapURL);
尝试{
_reportingService = _reportingServiceLocator.getReportingService2005Soap();
} catch (异常 e) { throw new ReportServicesException(“无法检索 SOAP 报告服务。”); 我
还可以连接到 ReportManager 作为我们在代码中连接的用户/密码。
我能找到的所有“文档”都只是 .NET 代码,似乎不适用于 Java 代码。 有没有人遇到过这样的问题,或者知道 Java 开发人员使用这些服务的好资源?
We're writing a web application that is trying to replace all ReportManager functionality using calls to Reporting Services SOAP API.
We started working with SSRS 2008 and had our Java code working correctly. We've since had to downgrade to SSRS 2005 and now we're having problems connecting to the Server to get the list of reports available.
We make the following call:
catalog = _reportingService.listChildren(_reportCredentials.getFolder(), false);
which returns an exception - (401)Unauthorized
_reportCredentials just holds information from a properties file (like the folder to use, the username and password, etc.). _reportService is defined as:
private ReportingService2005Soap _reportingService;
...
_reportingServiceLocator = new ReportingService2005Locator();
_reportingServiceLocator.setReportingService2005SoapEndpointAddress(soapURL);
try {
_reportingService = _reportingServiceLocator.getReportingService2005Soap();
} catch (Exception e) {
throw new ReportServicesException("Could not retrieve SOAP Reporting Service.");
}
I can also connect to ReportManager as the user/password we're connecting with in the code.
All of the 'documentation' I can find is just .NET code that doesn't seem to apply to the Java code. Has anybody experienced problems like this, or know of a good resource for Java developers using these services?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们将问题追溯到 Windows Server 2008 上安装了 SSRS 2005。按照此处的步骤操作: http://www.omegaprojex.com/index.php/2008/10/10/ssrs-2005-on-windows-server-2008/ 解决了我们的问题。
We traced the problem back to having SSRS 2005 installed on Windows Server 2008. Following the steps here: http://www.omegaprojex.com/index.php/2008/10/10/ssrs-2005-on-windows-server-2008/ fixed our problem.