Highlighted
Regular Contributor.
Regular Contributor.
623 views

System error -2147012711 during calling web services in UFT

Hi All ,

During  web services  testing in UFT tool, I am facing  "System error -2147012711  "

in  the  code line  oXmlHttp.send  oDom.xml  as pasted below .

The Scenario is :

In GUI Testing  project, calling web services (HTTPS) to do some operation.

The understand  i  copied code .

In webservicesXMl method  we are passing 3 parameters

sWebServiceURL: Webservices Url (HTTPS)

sSOAPAction :  Some Action 

sSOAPRequest:  Input xml to process web services.

///////////////////////////////////////////////////////////////////////////

Public Function WebServicesXML(sWebServiceURL,sSOAPAction,sSOAPRequest)
Dim flag500
flag500=0
startTime=Timer()
stepName="Run Web Services "
inputParameter="<b>Web Service URL : </b> " & sWebServiceURL & "<br><b>SOAP Action :</b>" & sSOAPAction
Dim sContentType
Dim oDom, oXmlHttp
Dim sResponse
Dim strEnvelope
sContentType ="text/XML;charset=uft-8" 'Web Service Content Type

Set oXmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
'oXmlHttp.setOption 2,13056
'oXmlHttp.setOption 3 ,oXmlHttp.getOption(2) -SXH_SERVER_CERT_IGNORE_CERT_DATE_INVALID
'oXmlHttp.setOption 2 ,oXmlHttp.getOption(2) -SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
'Create objects to DOMDocument and XMLHTTP
Set oDom = CreateObject("MSXML2.DOMDocument")

'Load XML
oDom.loadXML sSOAPRequest

oXmlHttp.open "POST", sWebServiceURL, False

'Create headings
oXmlHttp.setRequestHeader "Content-Type", sContentType

'oXmlHttp.setRequestHeader "SOAPAction", sSOAPAction

'Send XML data to web server.

oXmlHttp.send oDom.xml

sResponse=oXmlHttp.responseText
Do Until oXmlHttp.readyState=4
Loop
sResponse = oXmlHttp.ResponseText
WebServicesXML=sResponse
'Set output parameter as status to display in html report
outputParameter=oXmlHttp.Status
Environment.Value("ResponseCode")=oXmlHttp.Status
If oXmlHttp.Status = 200 And oXmlHttp.Status <> "" Then
status="DONE"
Message="Web services call successfully"

 

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

Please help me on this issue. 

Thanks in advances

 

Thanks & Regards

Iranna M Lekkihal

 

 

0 Likes
4 Replies
Highlighted
Respected Contributor.
Respected Contributor.

Re: System error -2147012711 during calling web services in UFT

Hello Iranna.

I hope you are doing well.

In order to help you please provide me the following information:

Which version of UFT are you using?

Could you please send me an screenshot of the error?

Thank you in advance.

Kind regards,

Susse

Highlighted
Regular Contributor.
Regular Contributor.

Re: System error -2147012711 during calling web services in UFT

Hi Susse,

Thanks for your reply.

Currently i am using UFT 12.01 version and unable to take screen shot because of remote connection.

So i given one paint image. 

Please let me know, If you get any solution for this issue.

Thanks in advance.

Thanks & Regards

Iranna

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: System error -2147012711 during calling web services in UFT

Hello Iranna,

Could you please send me the screenshot of the error from the UFT window?

Could you please provide me the UFT Logs?

How to enable Unified Functional Testing (UFT) logs?
https://softwaresupport.softwaregrp.com/group/softwaresupport/search-result/-/facetsearch/document/KM00467327

Thank you in advance.

Kind regards,

Susse

 

0 Likes
Highlighted
Regular Contributor.
Regular Contributor.

Re: System error -2147012711 during calling web services in UFT

Hi All ,
Thanks for your suggestion for enable UFT log. In that log the "The server committed a protocol violation . Section=Responsestatusline" error is present.
Please let me know , if u know any solution for this issue.

For reference once again I pasted the code details in below.

//////////////////////{//////////////////////////////////////////////
During web services testing in UFT tool, I am facing "System error -2147012711 "

in the code line oXmlHttp.send oDom.xml as pasted below .

The Scenario is :

In GUI Testing project, calling web services (HTTPS) to do some operation.

The understand i copied code .

In webservicesXMl method we are passing 3 parameters

sWebServiceURL: Webservices Url (HTTPS)

sSOAPAction : Some Action

sSOAPRequest: Input xml to process web services.

///////////////////////////////////////////////////////////////////////////

Public Function WebServicesXML(sWebServiceURL,sSOAPAction,sSOAPRequest)
Dim flag500
flag500=0
startTime=Timer()
stepName="Run Web Services "
inputParameter="<b>Web Service URL : </b> " & sWebServiceURL & "<br><b>SOAP Action :</b>" & sSOAPAction
Dim sContentType
Dim oDom, oXmlHttp
Dim sResponse
Dim strEnvelope
sContentType ="text/XML;charset=uft-8" 'Web Service Content Type

Set oXmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
'oXmlHttp.setOption 2,13056
'oXmlHttp.setOption 3 ,oXmlHttp.getOption(2) -SXH_SERVER_CERT_IGNORE_CERT_DATE_INVALID
'oXmlHttp.setOption 2 ,oXmlHttp.getOption(2) -SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
'Create objects to DOMDocument and XMLHTTP
Set oDom = CreateObject("MSXML2.DOMDocument")

'Load XML
oDom.loadXML sSOAPRequest

oXmlHttp.open "POST", sWebServiceURL, False

'Create headings
oXmlHttp.setRequestHeader "Content-Type", sContentType

'oXmlHttp.setRequestHeader "SOAPAction", sSOAPAction

'Send XML data to web server.

oXmlHttp.send oDom.xml

sResponse=oXmlHttp.responseText
Do Until oXmlHttp.readyState=4
Loop
sResponse = oXmlHttp.ResponseText
WebServicesXML=sResponse
'Set output parameter as status to display in html report
outputParameter=oXmlHttp.Status
Environment.Value("ResponseCode")=oXmlHttp.Status
If oXmlHttp.Status = 200 And oXmlHttp.Status <> "" Then
status="DONE"
Message="Web services call successfully"



////////////////////////////////////////////////////////////////////////////////////////////////////////////////



Please help me on this issue.

Thanks in advances



Thanks & Regards

Iranna M Lekkihal



0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.