首先我已经用java的client端连接webservice测试通过了。
但用vb6.0总是保错
代码:
Private Client As SoapClient30
  Dim soap  Private Sub Connect()
    Set Client = New SoapClient30
    Client.ClientProperty("ServerHTTPRequest") = True'    Client.MSSoapInit2 "http://localhost:7001/client/Client/wsdl.jsp", "http://localhost:7001/client/Client/wsdl.jsp", "ClientRemote", "ClientRemotePort", "ClientRemote"
   Call Client.MSSoapInit("http://localhost:7001/client/Client/wsdl.jsp", "ClientRemote", "ClientRemotePort")
    'Client.mssoapinit "http://localhost:7001/weather/statelessSession.WeatherHome/statelessSession.WeatherHome.wsdl", "Weather", "WeatherPort"
    
    
    
'    Set soap = CreateObject("MSSOAP.SoapClient30")
'    'On Error Resume Next
'    'soap.mssoapinit urlText.Text
'    Call soap.MSSoapInit("http://localhost:7001/client/Client/wsdl.jsp", "", "")
'    Text1.Text = soap.testWS("test")  End Sub
 
Private Sub getTemperature_Click()    On Error GoTo ErrorHandler    Connect    'Text1.Text = CStr(Client.getTemp(ZipCode.Text)) & CStr("癋")
    'Text1.Text = Client.testWS("test")    Exit Sub
ErrorHandler:
    MsgBox Client.FaultString, vbExclamation
End Sub详细的错误信息:
SoapMapper:The schema definition with a targetnamespace of http://www.w3.org/1999/XMLSchema for SoapMapper string could not be found HRESULT=0x80004005: 未指定的错误
 - SoapMapper:The SoapMapper for element string could not be created HRESULT=0x80004005: 未指定的错误
 - WSDLOperation:Initialization of a SoapMapper for operation getBankInfo failed HRESULT=0x80004005: 未指定的错误
 - WSDLOperation:Initializing of the input message failed for operation getBankInfo HRESULT=0x80004005: 未指定的错误
 - WSDLPort:An operation for port ClientRemotePort could not be initialized HRESULT=0x80004005: 未指定的错误
 - WSDLPort:Analyzing the binding information for port ClientRemotePort failed HRESULT=0x80004005: 未指定的错误
 - WSDLService:Initialization of the port for service ClientRemote failed HRESULT=0x80004005: 未指定的错误
 - WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005: 未指定的错误
 - Client:One of the parameters supplied is invalid. HRESULT=0x80070057: 参数错误。
谢谢各位大虾!!!!