Highlighted
Absent Member.
Absent Member.
2392 views

An error occurred in the secure channel support

 

I am testing a web services on Data-power.

 

I used below setting in soap ui file prior to send any web service request to ssl datapower via SOAP UI.
-Dsoapui.https.protocols=TLSv1.2
-Dsoapui.https.ciphers=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

along with Attaching keystroke certificate(PEX file) under ssl preference

its working fine after setting done.

 

Problem:

When I want to send same web service request in UFT, unable to do it, because not having an idea how to add protocols - SSL and ciphers.

I am using below code to send a service request, but it fails with an error "An error occurred in the secure channel support"

VB Script code I have used.

strSecureCertificate="i1s_testcore.oi1.client_ssl"
strXML="G:\Request_CNA_T1.xml"
strWSDLurl= "https://betalen-pf-t1.services.rabobank.nl/rc/GetActualBalance/02"
strSOAPurl = "https://betalen-pf-t1.services.rabobank.nl/rc/GetActualBalance/02"

Set oWinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
oWinHttpReq.Open "GET", strWSDLurl, False
oWinHttpReq.setRequestHeader "Content-Type", "text/xml"
oWinHttpReq.setRequestHeader "Accept", "text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
oWinHttpReq.setRequestHeader "Content-Transfer-Encoding", "binary"
oWinHttpReq.setRequestHeader "Connection", "keep-alive"
oWinHttpReq.SetRequestHeader "SOAPACTION", strSOAPurl
oWinHttpReq.SetClientCertificate strSecureCertificate 'Selecting certificate


oWinHttpReq.Option WinHttpRequestOption_SecureProtocols=2720



Set strXML1 = XMLUtil.CreateXMLFromFile(strXML)

strData=strXML1.ToString
oWinHttpReq.Send(strData)

sWSDLResponseTXT = oWinHttpReq.responseText ' We get the response in text format
msgbox sWSDLResponseTXT       

      

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.