I am trying to interface with HP Quality Center using Groovy with a Jacob COM wrapper, but I am running into problems.
When I try to run the following code:
import com.jacob.activeX.ActiveXComponent
import com.jacob.com.*
def QCUrl = "http://qc.example.com/qcbin"
def QCcom = new ActiveXComponent("TDApiOle80.TDConnection")
def conQC = QCcom.getObject()
Dispatch.call(conQC, 'InitConnectionEx', QCUrl)
I get this exception:
com/jacob.com.ComFailException: Can't map name to dispid: InitConnectionEx
The HP Quality Center OTA makes it clear that InitConnectionEx
is the method that I am interested in; however, I feel like I am missing a step somewhere. Any help would be greatly appreciated.
After much google time, I have come to the fix to my issue. The error was happening because I was not starting SoapUI with Admin rights.
Apparently, if the application you are running does not have admin rights, then it cannot create the necessary ActiveXObjects. When I would try to instantiate an ActiveXObject, I would not get any error, but the TDConnection object wasn't created and therefore InitConnectionEx was not present.
After starting SoapUI with admin rights, I am able to connect.
I got the idea from reading this article.