使用 SDK 时 Business Objects 登录失败

问题描述 投票:0回答:1

我正在将 BI3.X API 应用程序迁移到 BI4.1。该应用程序的目的是从 SAP BOE 检索 PDF 报告。

我参考了一些文件,并且能够使用 Opendoc URL 来制作它。但我只收到 HTML 作为 opendoc URL 中的响应。所以我决定使用 SDK 来检索 PDF 作为响应..

我在使用 SDK 登录应用程序时遇到问题。可以从 Web 浏览器访问 BOE 集群名称,但我无法 ping 通它。

早些时候我使用带有以下 URL 的 secLDAP 身份验证获取 opendoc 的令牌 http://server.domain.com:6405/biprws/logon/long

我现在使用的代码:

ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession enterpriseSession = 
       sessionMgr.logon("username", "password", "server.domain.com:6405", "secEnterprise");
String sessionToken = enterpriseSession.getLogonTokenMgr().getDefaultToken();

在运行上面的代码时,我收到以下错误消息。 无法连接 CMS。指定正确的主机和端口并检查网络问题。

我试图找出问题所在。 http://server.domain.com/BOE/BI可访问 但是当我尝试 ping server.domain.com 时,它无法访问。

知道我现在应该做什么吗?我仍然不确定这是如何工作的,因为我是 SAP 环境的新手。 我什至不确定我是否应该使用我在 opendoc 中使用的相同服务器名称。

java business-objects business-objects-sdk
1个回答
0
投票

您可以使用opendocument URL指定输出格式。只需添加参数

sOutputFormat
。可能的值是:

  • H: HTML
  • P : PDF
  • E:Excel(仅限水晶报表)
  • W:RTF(仅限 Crystal Reports)

所以您将拥有以下 URL: http://server:port/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=AZuIwjRPI2BApS7VCZMFpNs&sIDType=CUID&sOutputFormat=P

没有cuid也可以使用docId http://server:port/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=5676&sOutputFormat=P

OpenDocument URL 文档可在此处获得:https://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_opendocument_en.pdf

要使用 REST API 以 PDF 格式导出 rep 文件,您必须使用以下 URI: http:///infostore//rpt/export?mime_type=application/pdf

Crystal Reports RESTful 文档可在此处获得:http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41sp3_cr_restws_en.pdf

© www.soinside.com 2019 - 2024. All rights reserved.