Option Explicit
Dim soapClient3 'VB中应改为Dim soapClient3 as SoapClient30
set soapclient3 = CreateObject("MSSOAP.SoapClient30")
On Error Resume Next
Call SoapClient3.mssoapinit("DocSample1.wsdl", "DocSample1", "Sample1SoapPort")
' "DocSample1.wsdl" 应改为
'"http://Server/VDir/DocSample1/Server/DocSample1.asmx?WSDL"
'并且:不要添"Sample1SoapPort"
SoapClient3.ConnectorProperty("EndPointURL")=_
"http://Server/VDir/DocSample1/Server/DocSample1.WSDL"
'应改为DocSample1.asmx?WSDL
wscript.echo SoapClient3.EchoString("Bob")
wscript.echo SoapClient3.AddNumbers(2, 3) 'VB中:MsgBox 代替 wscript.echo
我在微软样例的恶梦中!!!!!!!
Server端是用C#和VS.net的WSDL工具生成的wsdl文件和ASMX