rational-team-concert - RTC简单ID查询结果404?

标签 rational-team-concert ibm-jazz oslc

我试图通过 ID 简单地“查找”RTC 票证,但它告诉我 404 未找到。也许我应该用一些东西替换 _ggTXcJdTEeCznlnpJMXHdQ ?或爵士乐或oslc或上下文或http://purl.org/dc/terms/ ?我不知道什么是占位符,也不知道我应该从 docs 更改什么以针对我自己.

    public static void GetTicket(string credentials)
    {
        string localhost = "my.host.com";
        string WtId = "2494443"
        string item = "https://" + localhost + ":9443/jazz/oslc/contexts/_ggTXcJdTEeCznlnpJMXHdQ/workitems?" +
            "oslc.where=dcterms:identifier=%22" + WtId + "%22&" +
            "oslc.properties=dcterms:title,dcterms:identifier&" +
            "oslc.prefix=dcterms=%3Chttp://purl.org/dc/terms/%3E";
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(item);
        request.Accept = "application/json";
        request.Headers.Add("Authorization", "Basic " + credentials);
        WebResponse response = request.GetResponse();
        // ... more stuff
    }

最佳答案

您的代码来自您提到的文档的“Query Capabilities ”部分。

我确认,_ggTXcJdTEeCznlnpJMXHdQ示例的一部分,而不是预期在您自己的环境中工作的内容。

discovery mechanism是关键:

Clients should not rely on specific URLs or perform path math on URLs. Instead, they should use the discovery chain offered by RTC. Here's an outline of the process to find the Change Management functionality:

The root document is exposed at https://<server>:<port>/<app>/rootservices.
In a typical RTC testbed, this is https://localhost:9443/jazz/rootservices

Fetch this document and extract the Change Management Catalog URL (pointed to by rdf:about) of the element oslc:ServiceProviderCatalog

Fetch the document behind this URL. It contains a list of ServiceProvider elements that point to the documents which contain the actual service descriptions.
In the case of RTC, there is one ServiceProvider element for each Project Area. Typically, an application would use the title of this element to allow the user to choose between the project areas.

Fetch the services document pointed to by property rdf:about of element oslc:ServiceProvider.
This document contains references to services and operations like:

  • Creation Factories to create new work items,
  • Query capabilities that allows to query work items,
  • Delegated UI dialogs to create and select work items, and
  • CLM Filters that are pre-defined queries on work items.

只有遵循此发现路径,您才能获得用于工作项查询的实际 URL。

关于rational-team-concert - RTC简单ID查询结果404?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61108722/

相关文章:

java - 有没有办法用 Perl 连接到 Rational Team Concert?

java - 在 Java 中使用 Polarion API 删除 OSLC 链接

rational-team-concert - RTC客户端: get current work item?

rtc - 如何从 RTC workItem jazz 中读取历史记录

maven - 有没有人尝试过使用 Mvn Deploy 部署到 Rational Team Concert

java - 在不使用工作空间的情况下获取变更集中文件的路径

ibm-doors - 获取所需的模块并使用 OSCL + JAVA 在其中添加工件

eclipse-plugin - RTC - checkin 时出错,文件被标记为添加但已存在于存储库中

version-control - 稍后在 RTC 中查找先前删除的代码?