J
jenenens
Unregistered / Unconfirmed
GUEST, unregistred user!
我通过VB使用Soap消息调用Web Services写了一个接口。
但是在调试的时候总是爆出错误:WSDLReader:XML Parser failed at llinenumber 0,linepostion 0 ,reason is:拒绝访问。
HRESULT=0x1:功能错误。
。。。。。。。。。。。
-Client:One of the parameters supplied is invalid.
Web Services是用Java写的。
请问这是什么错误?我该怎么做呢?
感激。。。。。
伏上接口程序!!!
Option Explicit
Private mSoapClient As MSSOAPLib30.SoapClient30
Private mIniFile As IniFile
Private xmlResultSet As New XMLResult
Dim a As String
Private Sub Class_Initialize()
Dim BDOWsdl, WFWsdl, ServiceName, PortType, TargetNamespace, IniFilePath As String
IniFilePath = App.Path + "/WfWsClient.ini"
Set mIniFile = New IniFile
BDOWsdl = mIniFile.GetIniKey("BusinessDataOperateWSDL", "BusinessDataOperateWsdlPath", "", IniFilePath)
ServiceName = mIniFile.GetIniKey("BusinessDataOperateWSDL", "ServiceName", "", IniFilePath)
PortType = mIniFile.GetIniKey("BusinessDataOperateWSDL", "PortType", "", IniFilePath)
TargetNamespace = mIniFile.GetIniKey("BusinessDataOperateWSDL", "TargetNamespace", "", IniFilePath)
If BDOWsdl = ""
then
BDOWsdl = App.Path + "/WS_BusinessDataOperate.wsdl"
Set mSoapClient = New MSSOAPLib30.SoapClient30
mSoapClient.MSSoapInit2 BDOWsdl, "", ServiceName, PortType, TargetNamespace(程序跑到这里就出错)
End Sub
Public Function query(ByVal sessionid As String, ByVal s_sql As String) As XMLResult
If xmlResultSet.Load_XmlDoc(mSoapClient.query(sessionid, s_sql)) then
Set query = xmlResultSet
End Function
Public Function execute(ByVal sessionid As String, ByVal s_sql As String) As Boolean
execute = mSoapClient.execute(sessionid, s_sql)
End Function
Public Function executeBatch(ByVal sessionid As String, ByRef s_sql() As String) As Boolean
executeBatch = mSoapClient.executeBatch(sessionid, s_sql)
End Function
但是在调试的时候总是爆出错误:WSDLReader:XML Parser failed at llinenumber 0,linepostion 0 ,reason is:拒绝访问。
HRESULT=0x1:功能错误。
。。。。。。。。。。。
-Client:One of the parameters supplied is invalid.
Web Services是用Java写的。
请问这是什么错误?我该怎么做呢?
感激。。。。。
伏上接口程序!!!
Option Explicit
Private mSoapClient As MSSOAPLib30.SoapClient30
Private mIniFile As IniFile
Private xmlResultSet As New XMLResult
Dim a As String
Private Sub Class_Initialize()
Dim BDOWsdl, WFWsdl, ServiceName, PortType, TargetNamespace, IniFilePath As String
IniFilePath = App.Path + "/WfWsClient.ini"
Set mIniFile = New IniFile
BDOWsdl = mIniFile.GetIniKey("BusinessDataOperateWSDL", "BusinessDataOperateWsdlPath", "", IniFilePath)
ServiceName = mIniFile.GetIniKey("BusinessDataOperateWSDL", "ServiceName", "", IniFilePath)
PortType = mIniFile.GetIniKey("BusinessDataOperateWSDL", "PortType", "", IniFilePath)
TargetNamespace = mIniFile.GetIniKey("BusinessDataOperateWSDL", "TargetNamespace", "", IniFilePath)
If BDOWsdl = ""
then
BDOWsdl = App.Path + "/WS_BusinessDataOperate.wsdl"
Set mSoapClient = New MSSOAPLib30.SoapClient30
mSoapClient.MSSoapInit2 BDOWsdl, "", ServiceName, PortType, TargetNamespace(程序跑到这里就出错)
End Sub
Public Function query(ByVal sessionid As String, ByVal s_sql As String) As XMLResult
If xmlResultSet.Load_XmlDoc(mSoapClient.query(sessionid, s_sql)) then
Set query = xmlResultSet
End Function
Public Function execute(ByVal sessionid As String, ByVal s_sql As String) As Boolean
execute = mSoapClient.execute(sessionid, s_sql)
End Function
Public Function executeBatch(ByVal sessionid As String, ByRef s_sql() As String) As Boolean
executeBatch = mSoapClient.executeBatch(sessionid, s_sql)
End Function