来自 Java 的 Reporting Services WS - 获取 (401) 未经授权

发布于 2024-07-08 18:06:51 字数 990 浏览 10 评论 0原文

我们正在编写一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌辣 2024-07-15 18:06:51

我们将问题追溯到 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文