【发布时间】:2014-06-06 05:06:00
【问题描述】:
我正在试用 HP ALM 12,发现 REST api 发生了变化,但我不知道如何让它与适用于 ALM 11.5 的 java 代码一起工作。
使用 ALM 11.5 我发送以下 http 请求:
http://myALM:8000/qcbin/rest/is-authenticated (which calls /authenticate)
http://myALM:8000/qcbin/rest/domains/DEFAULT/projects/DEMO/requirements?login-form-required=y&fields=father-name,name,req-priority,request-status,description,name,status&query={status[NOT%20N/A]}
上面一切正常。
对于 ALM 12,其 REST 文档说我需要显式调用 /rest/site-session 资源以获取 QCSession(在 ALM 11.5 中第一次调用任何资源时自动返回),但我无法获得返回 QCSession 的调用。以下是发送到 ALM 12 的 http 请求列表:
http://myALM:8000/qcbin/rest/is-authenticated (which calls authenticate)
http://myALM:8000/qcbin/rest/site-session
http://myALM:8000/qcbin/rest/domains/DEFAULT/projects/DEMO/requirements?login-form-required=y&fields=father-name,name,req-priority,request-status,description,name,status&query={status[NOT%20N/A]}
对 rest/site-session 的调用返回 JSESSIONID,就好像它是第一个请求一样,显然其余代码都失败了。
我在这里做错了什么?
【问题讨论】: