【问题标题】:How to get all OpenText Content Server categories in one call?如何在一次调用中获取所有 OpenText Content Server 类别?
【发布时间】:2015-10-01 08:30:07
【问题描述】:

我目前的项目涉及 OpenText Content Server 10.5 SP1 更新 2015-03。

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

在 Web 服务方面,我发现 DocumentManagement WSDL GetCategoryDefinition 和 GetCategoryDefinitions 公开的几个方法需要 categoryID 作为参数。

在 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 可提供有关该类别的所需信息。

我希望通过一个电话来返回有关我需要的类别的所有信息。

有可能实现吗?

【问题讨论】:

    标签: java web-services opentext


    【解决方案1】:

    这是可能的。

    你需要做什么:

    1.) 查找类别的所有 ID,您需要定义

    2.) 致电DocumentManagementWS.getCategoryDefinitions(IDs)

    示例

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

    // 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);
    

    【讨论】:

    • 感谢 sn-p。我们也将类别存储在文件夹中。你能解释一下如何获取 configRoot 对象吗?
    • 我们的 configRoot - 这个节点在之前被读取 - 是保存所有配置的节点。它有一个昵称,所以我们之前通过它的昵称来阅读它。只需调用 dm.getNodeByNickname("theNickname")
    【解决方案2】:

    也许不完全是面向程序的,但您知道处理程序 "cs.exe?func=attributes.dump" 吗?这是您所要求的 UI 版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 2012-12-26
      • 1970-01-01
      相关资源
      最近更新 更多