vb调用WebService

1:安装Soap Toolkit     可以网上下载

 

2:新建VB工程,添加对soap toolkit的引用(Microsoft Soap Type Library 3.0)

 

3:

Private Sub Command1_Click()

Dim client As New MSSOAPLib30.SoapClient30

Call client .MSSoapInit ("http://localhost:1234/DemoWebService/Service.asmx?WSDL")

msgbox client.HelloWorld()

Set client = Nothing

End Sub

你可能感兴趣的:(vb调用WebService)