- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
api 中的查询函数失败,出现以下异常:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
为了解决这个异常,我手动下载了证书并将其导入到 cacerts 中,一切正常。但是此证书的有效期已设置为几天,因此此解决方案不可行。
出于测试目的,我创建了一个允许所有证书的信任策略,但我没有找到将它与 Rest Api 集成的方法。我正在使用 HttpClient 4.4。
我该如何解决这个问题?谢谢。
最佳答案
您写道,您希望找到一种允许所有证书的方法,并将 HttpClient 与 Rally Rest Toolkit for Java 结合使用。以下是如何从 restApi 访问 HttpClient:
HttpClient client = restApi.getClient();
这是一个信任所有证书的例子,例如自签名证书:
public class ConnnectionTestWithHTTPClient {
public static void main(String[] args) throws URISyntaxException, IOException {
String host = "https://rally1.rallydev.com";
String apiKey = "_abc123";
String applicationName = "Connnection Test With HTTPClient";
RallyRestApi restApi = new RallyRestApi(new URI(host),apiKey);
restApi.setApplicationName(applicationName);
//restApi.setProxy(new URI("http://myproxy.mycompany.com"), "MyProxyUsername", "MyProxyPassword"); //YOUR PROXY SETTINGS HERE
HttpClient client = restApi.getClient();
try {
SSLSocketFactory sf = new SSLSocketFactory(new TrustStrategy() {
public boolean isTrusted(X509Certificate[] certificate, String authType)
throws CertificateException {
//trust all certs
return true;
}
}, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
client.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, sf));
String workspaceRef = "/workspace/12345";
GetRequest getRequest = new GetRequest(workspaceRef);
GetResponse getResponse = restApi.get(getRequest);
System.out.println(getResponse.getObject());
} catch (Exception e) {
System.out.println(e);
} finally {
restApi.close();
}
}
}
关于java - 带有 Rally rest api 的 SSLHandshakeException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36851534/
过去,我将 Rally 服务器上存在的一些图像合并到我的应用程序中——例如,我制作了一个更通用的“选择器”菜单,显示复选框,当然,复选框和框依赖于图像。 当然,当 SDK 版本更改时,我希望必须检查我
我有一个用户在集会中创建了一堆“故事”,而实际上它们应该是任务。有没有办法在 Rally 中将用户故事转换为任务?我已经搜索过 Rally 的帮助站点,但它似乎没有提供答案。 最佳答案 在 Rally
我需要修改默认的 Rally 看板应用程序以仅显示选定的迭代。我放入查询迭代下拉列表,然后添加: //基于迭代下拉列表构建查询 cardboardConfig.query = dropdownIter
如何在 Rally 中添加新的用户故事状态?即定义、完成、接受、自定义状态 最佳答案 拉力赛知识库文章“修改计划状态”: http://www.rallydev.com/help/modifying-
请谁能帮我解决这个问题,以下语法将如何出现在 Rally SDK 2 中或者您可以向我推荐一些相关文档,因为我找不到任何文档。 rally.function_name = function (rall
这似乎是一个非常基本的问题,但我在 Rally 中找不到它,所以就在这里,我在哪里可以找到拉力赛中的工作区和项目 OID? 最佳答案 为了其他可能想知道答案的用户的利益,这里有几种查找 OID 的方法
Rally 显然具有一些缺陷跟踪功能。 我的问题是;它足够好/足够灵活以作为组织的唯一缺陷跟踪器吗?或者在其他工具(如 Bugzilla 或 JIRA)中进行一般缺陷跟踪是否更常见? (可能使用 Ra
我创建了一个动态创建网格的应用程序,并允许用户通过“数字字段”编辑器对网格列之一进行更改。在调试环境中一切正常,但是当我尝试编辑 Rally 环境中的字段之一时,它会使应用程序崩溃。从它的外观来看,包
我正在尝试用 rally 组件做基本的 CSS。目前我正在努力让 xtype 'rallybutton' 与 xtype 'rallyiterationcombobox' 内联。我使用的 CSS 文件
鉴于表达式 {WorkProduct: {$in:[0001,0002,0003,...]} 我可以查询的项目数量有限制吗? 最佳答案 我们的 API 没有强制限制,但我们发送到底层引擎的整体查询必须
我想编写包含 Rally 问题(测试用例、缺陷等)链接的网页。我希望能够生成一个带有 FormattedID 的 URL。这可能吗?还是我真的需要objectID?例如: http://rally1.
如何查询我们所有可用项目的 Rally 实例? REST 调用的输出 https://rally1.rallydev.com/slm/webservice/1.29/subscription.js?f
我是 Rally API 的新手,只是在使用 Rally.RestApi 库创建任务时遇到了一些问题。我需要创建一个任务(使用 .NET)并将其与用户故事相关联(其中用户故事属于某个迭代)。 我是否必
我正在尝试创建一个应用程序,它将显示当前项目中的所有测试集及其通过/失败总数的状态。我面临的问题(顺便说一句,昨天刚开始学习 ExtJS 和 Rally SDK): - 我需要了解如何使用当前选择的项
我在外部开发时无法使用Rally.environment.getContext()。我需要在应用程序启动之前获取 ProjectOID 和 UserOID,因此我无法使用 app.getContext
我试图弄清楚如何通过 Cucumber 自动化脚本自动更新 Rally 中测试用例的测试用例结果。我希望能够运行我的测试脚本,然后该脚本将自动将 Rally 中的测试用例结果更新为“通过”或“失败”。
我们是一家使用 C#、Team Foundation Server 和 Rally 作为我们主要项目跟踪的商店。 我们想使用 Rally Item ChangeSets 来遵循 TFS Changes
我正在使用 Rally REST API 将来自 Rally 的用户故事数据集成到另一个应用程序中。我从 Rally 检索用户故事数据没有问题,但是,我想为其他应用程序的用户提供一个超链接,以便单击以
QueryRequest allreleases = new QueryRequest("release"); allreleases.setQueryFilter(new QueryFilt
我正在尝试使用 java Rally REST API 将图像文件附加到 Rally 中的测试结果(失败的屏幕截图)。图像文件附加到测试用例本身,但不附加到测试结果。试图提供 testCaseResu
我是一名优秀的程序员,十分优秀!