Micro Focus QTP (UFT) Forums
UFT:A connection with server could not be established with xml objects - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: UFT:A connection with server could not be established with xml objects (/Thread-UFT-A-connection-with-server-could-not-be-established-with-xml-objects)



UFT:A connection with server could not be established with xml objects - Lakshman.Repaka - 01-01-2018

Hi,

I am using DOM objects to get Json response from UFT GUI test instead of using add-ins. But I am getting error. URL contains HTTPS protocol.
...............................................................................................................................
Error : "-2146697202 . A security problem occurred" is displayed with below code.
Set oHttp=CreateObject("MSXML2.XMLHTTP")
oHttp.Open "GET",strURL,false
oHttp.Send
...............................................................................................................................
Error : "-2147012867 . A connection with server could not be established" is displayed with below code.
Set oHttp=CreateObject("MSXML2.SERVERXMLHTTP.6.0")
oHttp.Open "GET",strURL,false
oHttp.Send
...............................................................................................................................
Alternative approach: 
I tried to open the url from UFT editor manually for the first time, it prompted with certificate popup and after proving the password , got JSON response successfully. Now, if I try to run any of the above codes, I am getting response. Not sure what was the reason why its not asking for certificate prompt for first time.

Can anyone please help me on this?

Thanks in advance!!