I've been using XMLHTTP for making HTTP POST requests (From a VB5 application) to a WCF (self hosted in a windows service) endpoint with the next code and everything was working as expected,
Dim xmlhttp As MSXML2.XMLHTTP30
Dim blnSuccess As Boolean
Dim resp, strTit, strRes As String
Dim intPos1, intPos2, intPos3 As Integer
Dim mType As VbMsgBoxStyle
Set xmlhttp = New MSXML2.XMLHTTP30
xmlhttp.Open "POST", strURL, False
xmlhttp.setRequestHeader "Man", "POST " & strURL & " HTTP/1.1"
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.setRequestHeader "SOAPAction", strSOAPAction
Call xmlhttp.send(strSoap)
However since I was requested to change from HTTP to HTTPS Had to change WCF to add and SSL certificate by binding the certificate to the port, and everything was working fine while doing requests from postman, but the problem was that when I tried to test it on my VB application It did not work and I was prompted with this error run time error -214669728 (800c0008) The download of the specified resource has failed. So while doing some research I change my code to use SeverXMLHTTP instead of XMLHTTP and setOption for bypassing certificate errors as is shown in the next code
Dim xmlhttp As MSXML2.ServerXMLHTTP30
Dim blnSuccess As Boolean
Dim resp, strTit, strRes As String
Dim intPos1, intPos2, intPos3 As Integer
Dim mType As VbMsgBoxStyle
Set xmlhttp = New MSXML2.ServerXMLHTTP30
xmlhttp.Open "POST", strURL, False
xmlhttp.setRequestHeader "Man", "POST " & strURL & " HTTP/1.1"
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.setRequestHeader "SOAPAction", strSOAPAction
xmlhttp.setOption 2, 13056
blnSuccess = False
Call xmlhttp.send(strSoap)
The problem is that I been reading that as the name says, SeverXMLHTTP must be used for server application not client as my VB is acting in this context. I referred to this post
I am concerned if this is the correct path to follow but while reading this article I think I will not have problems even this object points to use between server to server communication.
Could anybody instruct me a little bit about this, what I observed in testing everything is good so far, but I not quite experienced using this object . Thanks