java - 如何在一次调用中获取所有 OpenText 内容服务器类别?

标签 java web-services opentext

我目前正在进行一个涉及 OpenText Content Server 10.5 SP1 更新 2015-03 的项目。

我正在尝试找出是否有可能使用 Java SOAP Web 服务或 REST 通过一次调用从系统类别卷中获取所有类别。

在 Web 服务方面,我发现了 DocumentManagement WSDL GetCategoryDe​​finitionGetCategoryDe​​finitions 公开的几个方法,它们需要类别 ID 作为参数。

在 REST 方面,我设法获得了对类别的访问权,但经过了相当长的旅程:

  1. 调用 otcs/cs.exe?func=search.GetCategoryVolume 给出后续调用的 URL 作为响应
  2. 调用 otcs/cs.exe?func=ll&ObjID=2005&objAction=XMLExport&scope=1 给出系统类别卷的 ID 以及类别 ID
  3. 调用 otcs/cs.exe?func=ll&ObjID=21361&objAction=XMLExport&scope=1 提供有关该类别的所需信息。

我希望通过一次调用返回有关我需要的类别的所有信息。

有可能实现吗?

最佳答案

这是可能的。

你需要做什么:

1.) 找到类别的所有ID,你想要的定义

2.) 调用 DocumentManagementWS.getCategoryDe​​finitions(IDs)

示例

在我的项目中,我们将所有类别存储在文件夹中,而不是在内容服务器的类别卷中。

// INFO: variable dm is an instance of the documentManagement-Webservice

// 1.) read the folder of the Categories
Node categoryRoot = dm.getNodeByPath(configRoot.getID(), Arrays.asList("Categories"));

// 2.) find all Ids of the categories
List<Node> categories = dm.listNodes(categoryRoot.getID(), false);

if (categories != null) {
    for (Node category : categories) {
        if (category.getType().equals("Category")) {
            categoryIds.add(category.getID());
        }
    }
}

// 3.) Read all defintitions of the categories
List<AttributeGroupDefinition> categoryDefinitions = dm.getCategoryDefinitions(categoryIds);

关于java - 如何在一次调用中获取所有 OpenText 内容服务器类别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32882884/

相关文章:

java - 如何使用<s :if> tag in Struts 2?

Asp.net 网站和 Web 服务托管

java - servlet url 模式匹配实现错误

java - 是否可以在一个查询中组合 2 个请求,而第二个请求仅在第一个请求没有带来任何内容时执行?

node.js - Node soap,使用受密码保护的 WSDL

java - 如何使用 JAXWSProxyHandler 传递 SOAP header

tiff - 存储在外部标记文件中的 Version2 Tiff 注释规范

java - 使用 REST Api 删除 OTDS 用户 - 无法删除同步对象

java - 为什么在Java中将枚举声明为Enum <E扩展了Enum <E >>

java - 如何使用 Tomee 绕过 Https SSLHandshakeException