从其ID获取用户名?

时间:2016-09-29 20:50:59

标签: opentext livelink

我必须通过其WCF界面与OpenText LiveLink进行通信。

我正在使用我传递节点ID的autocmd BufNewFile,BufRead *.test call KarlDetectWhitespace() fun! KarlDetectWhitespace() python << endpython import vim nr_unclean = 0 for line in vim.current.buffer: if line.rstrip() != line: nr_unclean += 1 print "Unclean Lines: %d" % nr_unclean print "Name: %s" % vim.current.buffer.name cmd = "autocmd BufWritePre <buffer> call KarlStripTrailingWhitespace()" if nr_unclean == 0: print "Enabling Whitespace Trimming on Save" vim.command(cmd) else: print "Whitespace Trimming Disabled" endpython endfun fun! KarlStripTrailingWhitespace() let l = line(".") let c = col(".") %s/\s\+$//e call cursor(l, c) endfun 函数,它返回有关文档的信息。

返回的字段之一是“CreatedBy”:797207

我需要获取用户名而不是ID ...这怎么可行?

1 个答案:

答案 0 :(得分:1)

您可以使用getMemberByID WS接口的MemberService方法,其XML请求如下:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:api.ecm.opentext.com" xmlns:urn1="urn:MemberService.service.livelink.opentext.com">
   <soapenv:Header>
      <urn:OTAuthentication>
         <!--Optional:-->
         <urn:AuthenticationToken>?</urn:AuthenticationToken>
      </urn:OTAuthentication>
   </soapenv:Header>
   <soapenv:Body>
      <urn1:GetMemberById>
         <urn1:memberID>?</urn1:memberID>
      </urn1:GetMemberById>
   </soapenv:Body>
</soapenv:Envelope>

一般来说,MemberService(http://your-OTCS-server/cws/MemberService.svc提供)为您提供了许多其他与用户相关的功能:

MemberService's available methods

您可以轻松地将WSDL导入到SoapUI等应用程序中,并执行您可能需要的所有测试。