java - 使用 com4j 连接到 HP Quality Center 时出错

标签 java com4j hp-quality-center

我正在尝试在 Win7 上的 eclipse 中使用 com4j 库连接到 hp qc 版本 10.00

我按照以下步骤操作:

  • 使用 tlbimp.jar 创建 OTAClient.dll 的包装器
  • 使用 regsvr32 注册 OTAClient.dll
  • 在程序中导入了 OTAClient Wrapper。
  • 导入 com4j 库。

使用以下代码:

import ota.ClassFactory;
import ota.ITDConnection;

public class comqc {

    public static void main(String args[]){

        ITDConnection td = ClassFactory.createTDConnection();   
        td.initConnectionEx("https://qcbt10.saas.hp.com/qcbin/start_a.htm");
        System.out.println(td.connected()); 
        td.connectProjectEx(domain, project, username, password);             
        }
}

获得以下输出:

true
Exception in thread "main" com4j.ComException: 80000482 (Unknown error) : Invalid server response : .\invoke.cpp:517
at com4j.Wrapper.invoke(Wrapper.java:166)
at $Proxy5.connectProjectEx(Unknown Source)
at qctools.main(qctools.java:15)
Caused by: com4j.ComException: 80000482 (Unknown error) : Invalid server response : .\invoke.cpp:517
at com4j.Native.invoke(Native Method)
at com4j.StandardComMethod.invoke(StandardComMethod.java:42)
at com4j.Wrapper$InvocationThunk.call(Wrapper.java:335)
at com4j.Task.invoke(Task.java:51)
at com4j.ComThread.run0(ComThread.java:153)
at com4j.ComThread.run(ComThread.java:134)

出了什么问题?

最佳答案

尝试将 https://qcbt10.saas.hp.com/qcbin 作为连接目标。

OTA引用(OTA_API_Reference.chm)中有很多示例;尽管是用 Basic 编写的,但它们应该很容易翻译为 Java。

关于java - 使用 com4j 连接到 HP Quality Center 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17940868/

相关文章:

testing - 质量中心 : link to attachment

java - QC ALM ( QC 11) 身份验证时 REST Api 400 错误

java - android:- 如何更改 recyclerview 列表项的语言?

java - 为什么我的 ByteArrayInputStream 在从任何字符串创建后为空?

Java 从另一个构造函数调用一个构造函数而不立即拥有参数

java - 使用 com4j 连接到现有的 iTunes 实例

java - 如何使用 JAVA OTA (COM4J) 从 TestResource 下载文件

java - jhipster 应用程序中 application-prod.yml 和 application-dev.yml 之间的区别

Win7 64 位上 Abbyy 的 Java Com4j 接口(interface)

c# - 质量控制 : How to Find a test in QC by test case id using OTA API in C#