This functionality is provided by the automated testing bridge that allows obtaining TestComplete test results to the QAComplete Automation screen. Starting from the release 9.9.0, this functionality is obsolete and is supported only for backward compatibility. |
Returns the AutomationHost
object that contains information on the host specified by its ID.
To specify a project that contains the link item, use the ProjId
value in the AuthenticationData
object in the request body. To search for the link item in several projects, use the ProjIds
value to specify the list of projects IDs in the AuthenticationData
object.
Requirements
The user must belong to a security group that has the Read privilege for Automation Hosts.
Parameters
The operation uses the following parameters:
AuthenticationData : , required
An AuthenticationData
object with the login information and the ID of the project (or the list of project IDs) whose host you want to get.
AutomationHostId : integer, required
The ID of the host you want to get.
Result
The AutomationHost
object that stores information on the needed host.
Example
Sample Code
C#
string login = "[email protected]";
string password = "p@ssword";
ServiceSoapClient service = new ServiceSoapClient();
// Prepare AuthenticationData
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;
authData.ProjId = loginInfo.ProjId;
// ID of the desired host
int hostId = 1;
// Get the AutomationHost object
AutomationHost host = service.AutomationHosts_Load(authData, hostId);
Console.WriteLine(host.HostName);
Java
String login = "[email protected]";
String password = "p@ssword";
ServiceSoap service = new Service().getServiceSoap12();
// Prepare AuthenticationData
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());
authData.setProjId(loginInfo.getProjId());
// ID of the desired host
int hostId = 1;
// Get the AutomationHost object
AutomationHost host = new AutomationHost();
host = service.automationHostsLoad(authData, hostId);
System.out.println(host.getHostName());
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 523 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/AutomationHosts_Load"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AutomationHosts_Load xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<AutomationHostId>1</AutomationHostId>
</AutomationHosts_Load>
</soap:Body>
</soap:Envelope>
SOAP 1.2
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 531 {Insert an appropriate value here}
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AutomationHosts_Load xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<AutomationHostId>1</AutomationHostId>
</AutomationHosts_Load>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 686 {The server returns an appropriate value here}
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AutomationHosts_LoadResponse xmlns="http://www.pragmaticsw.com/">
<AutomationHosts_LoadResult>
<AutomaticHostId>1</AutomaticHostId>
<HostName>Test-WinXPx86</HostName>
<Description>Test host with Windows XP x86</Description>
<CreateUserId>24661</CreateUserId>
<UpdateUserId>24661</UpdateUserId>
<DateCreated>2014-07-20T09:26:39</DateCreated>
<DateUpdated>2014-08-12T10:17:52</DateUpdated>
</AutomationHosts_LoadResult>
</AutomationHosts_LoadResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 696 {The server returns an appropriate value here}
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AutomationHosts_LoadResponse xmlns="http://www.pragmaticsw.com/">
<AutomationHosts_LoadResult>
<AutomaticHostId>1</AutomaticHostId>
<HostName>Test-WinXPx86</HostName>
<Description>Test host with Windows XP x86</Description>
<CreateUserId>24661</CreateUserId>
<UpdateUserId>24661</UpdateUserId>
<DateCreated>2014-07-20T09:26:39</DateCreated>
<DateUpdated>2014-08-12T10:17:52</DateUpdated>
</AutomationHosts_LoadResult>
</AutomationHosts_LoadResponse>
</soap12:Body>
</soap12:Envelope>
See Also
Automation Hosts Operations
AutomationHosts_Add
AutomationHosts_Delete
AutomationHosts_LoadByCriteria
AutomationHosts_Update
Automated Testing Bridge Operations
SOAP API Reference