1

我正在尝试通过发送到我们的 Jazz 服务器的帖子在 RTC 中生成构建票证。当我这样做时,我总是遇到需要设置“拥有者”属性的错误。据我从文档中可以看出, dcterms:contributor 是所有者。我试过编造一个“dcterms:ownedBy”和“dcterms:OwnedBy”和“dc:OwnedBy”等,但没有任何效果。为什么不喜欢??

我要发送的内容:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
         xmlns:dcterms="http://purl.org/dc/terms/" 
         xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/" 
         xmlns:rtc_ext="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/">
   <rdf:Description rdf:nodeID="A0">
      <dcterms:contributor rdf:resource="https://[host]/jts/users/[user_id]" />
      <rtc_cm:due rdf:dataType="http://www.w3.org/2001/XMLSchema#dateTime">2020-06-24T16:00:00.000Z</rtc_cm:due>
...

回复:

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:oslc="http://open-services.net/ns/core#">
    <oslc:Error rdf:about="#n0">
        <oslc:message>'Save Work Item' failed. Preconditions have not been met: The 'Owned By' attribute needs to be set (work item &lt;08:54:54&gt;).</oslc:message>
        <oslc:statusCode>403</oslc:statusCode>
    </oslc:Error>
    <rdf:Description rdf:about="https://[host]/ccm/oslc/contexts/[project-key]/workitems/[build.item]">
  </rdf:Description>
</rdf:RDF>
4

1 回答 1

1

事实证明,错误是在说谎。如果任何属性设置不正确,我将收到未设置“拥有者”的先决条件错误。最后,我有几个属性错误。在上面的示例中,rtc_cm:due 错误,因为标签中包含 rdf:dataType。或者至少标签的那部分有问题。删除它使其工作正常。

于 2020-05-12T16:46:40.893 回答