I don't know if there is a better way than doing this through VBA, using a low-level Http POST to send the SOAP message to the server. You will have to process the XML-SOAP message in any way you choose. Here is an example function for doing Http POST in VBA.
Function doHttpPost(request As String) As String
Dim response As String
Dim http As WinHttp.WinHttpRequest
Set http = New WinHttp.WinHttpRequest
On Error GoTo doPostError
http.setTimeouts 30000, 30000, 30000, 300000
http.Open "POST", "http://someserver.com/soapListener", False
http.setRequestHeader "name", "value" 'set any headers you want'
http.send request
If http.Status <> 200 Then
MsgBox "An error has occurred with your request. " & vbCrLf & "The error message is: " & http.responseText & vbCrLf & http.Status & " " & http.statusText
Exit Function
End If
doHttpPost = http.responseText
Exit Function
doPostError:
'process error messages here'
End Function
source
share