1

嗨,所有社区。

这个问题与一个名为 OpenText Content Server 10.5(以前称为 LiveLink)的特定产品和他的 Content Server Web Service (CWS) 的使用有关。

我们使用一个非常简单的调用来检索文档,使用他的 DocumentID“GetNode”传递内部文档 ID:

这种方法每次都有效,除非我们检索一些带有 xls 或 xlsx 扩展名的文件,如 Microsoft Excel。

即使是其中包含“Hallo Word”的文本文件,重命名为 xls 也不起作用!

我的想法是,这可能是:a) 一个有问题的 Web 服务,需要一个补丁 b) 我们在 LiveLink 配置中遗漏了一些东西来启用某些文件。

任何帮助都不受欢迎

感谢前卫的任何支持

- - - - - 第2部分 - - - - - - - - -

更具体地说,考虑我们有一个 ID = 229835 的文档(昵称也具有相同的值)

1) 使用GetNode(229835)我们收到以下错误:Livelink 服务器上的 DocumentManagement.GetNode() 失败。没有返回任何结果。检查 Livelink 服务器线程日志。(服务器日志上没有任何内容!)

2)使用GetNodeByNickName("229835")一切正常。

3) 使用 te GetGUID(229835)我们首先检索像“3F67..8942”这样的 GUID,然后使用GetNodeByGUID(""3F67..8942")一切正常。

所以我的问题是为什么第一个命令失败而其他两个有效?

考虑到某些类型的 XLS、XLSX、ZIP、DOC、DOCX 文件“似乎”会发生这种情况。大小不超过 2 Mb。

4

1 回答 1

0

The GetNode call returns only the meta data for the node. You want to use GetVersionContents.

As a minimum you need to specify the ID and the versionNum for the required content. The following code is an example written in Ruby, but it should be easy to translate the logic into a different language.

  #
  # get specific +version+ of a document +id+
  # if +file_name+ is nil it returns the content of the file as base64 encoded string
  #
  def get_version(id, version, file_name=nil)
    response = @docman.request('GetVersionContents',
                               'wsdl:ID' => id,
                               'wsdl:versionNum' => version)[:contents]
    if file_name
      File.open(file_name, 'wb') do |f|
        f.write(Base64.strict_decode64(response))
      end
    else
      return Base64.strict_decode64(response)
    end
  end
于 2015-09-01T16:39:43.637 回答