RTC简单ID查询结果在404吗? [英] RTC Simple ID Query Results in 404?

查看:117
本文介绍了RTC简单ID查询结果在404吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过ID简单地查找" RTC票证,并告诉我404未找到.也许我应该将_ggTXcJdTEeCznlnpJMXHdQ替换为某些内容?还是爵士乐,oslc或上下文或 http://purl.org/dc/terms/?我不知道什么是占位符,我应该从

I'm trying to simply "find" an RTC ticket by ID and it's telling me 404 not found. Maybe I'm supposed to be replacing _ggTXcJdTEeCznlnpJMXHdQ with something? Or jazz or oslc or contexts or the http://purl.org/dc/terms/? I have no idea what's placeholder or not and what I'm supposed to change to be specific to me from the 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
    }

推荐答案

您的代码来自"查询功能"部分.

Your code comes from the "Query Capabilities" section of the documentation you mention.

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

And I confirm, _ggTXcJdTEeCznlnpJMXHdQ is part of an example, not something that is expected to work in your own environment.

发现机制是关键:

客户端不应依赖于特定的URL或对URL执行路径数学运算.相反,他们应该使用RTC提供的发现链.这是查找变更管理功能的过程的概述:

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:

根文档位于https://<server>:<port>/<app>/rootservices.
在典型的RTC测试平台中,这是https://localhost:9443/jazz/rootservices

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

获取此文档并提取元素oslc:ServiceProviderCatalog

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

在此URL后面获取文档.它包含ServiceProvider元素列表,这些元素指向包含实际服务描述的文档.
对于RTC,每个项目区域都有一个ServiceProvider元素.通常,应用程序将使用此元素的标题来允许用户在项目区域之间进行选择.

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.

获取元素oslc:ServiceProvider的属性rdf:about指向的服务文档.
本文档包含对服务和操作的引用,例如:

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

  • 创建新工作项的创建工厂,
  • 查询功能,可查询工作项,
  • 用于创建和选择工作项的委派UI对话框,以及
  • CLM筛选器是对工作项的预定义查询.
  • 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.

Only by following this discovery path will you get the actual URL to use for your work item query.

这篇关于RTC简单ID查询结果在404吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆