VB调用JAVA发布的webservice
Dim soap As New MSSOAPLib30.SoapClient30Private Sub Command1_Click()
Dim InsStr As String
Dim a As Boolean
InsStr = "<?xml version='1.0' encoding='utf-8'?><rootMenu><menu><FID>20065</FID><FDate>2011-07-19</FDate><Ftime>15:60</Ftime><FPdtID>p001-001</FPdtID><FPdtBS>prudcut identity</FPdtBS><FPdtBS1>prudcut identity11</FPdtBS1><FPdtBS2>prudcut identity222</FPdtBS2><Fresult>log infomation</Fresult><Fdescription>operator success</Fdescription><Fuser>jonefy</Fuser><FIP>192.168.42.75</FIP><Fcomputer>zhouqiaofei-25684</Fcomputer></menu></rootMenu>"
a = soap.getXMlElmentList(InsStr)
If a = True Then
Print "true"
Else
Print "false" + Err.Description
End If
End Sub
Private Sub Form_Load()
On Error Resume Next
soap.ClientProperty("ServerHTTPRequest") = True
Call soap.MSSoapInit("http://192.168.72.41:8080/fundacc35/services/docService?wsdl")
If Err <> 0 Then
MsgBox "初始化SOAP失败 " + Err.Description
Else
MsgBox "初始化成功"
End If
End Sub
访问WebService可能出现的错误
SoapMapper:The schema definition with a targetnamespace of http://schemas. for SoapMapper string could not be found HRESULT=0x80 004005: 未指定的错误
- SoapMapper:The SoapMapper for element string could not be created HRESULT=0x80004005: 未指定的错误
- WSDLOperation:Initialization of a SoapMapper for operation queryVioSurveil failed HRESULT=0x80004005: 未指定的错误
- WSDLOperation:Initializing of the input message failed for operation queryVioSurveil HRESULT=0x80004005: 未指定的错误
- WSDLPort:An operation for port VioOutAccess could not be initialized HRESULT=0x80004005: 未指定的错误
- WSDLPort:Analyzing the binding information for port VioOutAccess failed HRESULT=0x80004005: 未指定的错误
- WSDLService:Initialization of the port for service JaxRpcOutAccessService failed HRESULT=0x80004005: 未指定的错误
- WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005: 未指定的错误
- Client:One of the parameters supplied is invalid. HRESULT=0x80070057: 参数不正确。
大家帮忙分析下错误原因: