我已经浏览了一些主题,并且能够使用以下代码在 vb6 中调用服务:
Dim sUrl As String
Dim response As String
Dim xmlHttp
Private Sub Form_Load()
sUrl = "http://abc.com/services/abc.svc"
Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "POST", sUrl, False
xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.send
Dim response As String
response = xmlHttp.responseText
Set xmlHttp = Nothing
End Sub
问题是我如何在 vb6 中调用 WCF 服务并将参数传递给它的方法并获得结果?