|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
Public Sub CallU8Api()
On Error GoTo ErrHandler
Dim ologin As Object
Set ologin = CreateObject("U8Login.clsLogin")
If Not ologin.login("AS", "(default)@999", "2010", "demo", "", "2010-10-24", "localhost") Then
Dim u8EnvCtx As New U8EnvContext
Set u8EnvCtx.U8Login = ologin
Dim u8apiBroker As New U8ApiComBroker
u8apiBroker.Connect "U8API/PuStoreIn/Delete", u8EnvCtx
u8apiBroker.AssignNormalValue "sVouchType", "01" '参数类型:String"
u8apiBroker.AssignNormalValue "VouchId", "1000000214" '参数类型:String
Dim domMsg As New MSXML2.DOMDocument
u8apiBroker.AssignNormalValue "domMsg", domMsg '参数类型:MSXML2.IXMLDOMDocument2
If u8apiBroker.InvokeApi() = False Then
MsgBox u8apiBroker.GetLastError()
If u8apiBroker.ErrorType = ExceptionType_Business Then
ElseIf u8apiBroker.ErrorType = ExceptionType_System Then
End If
Else
Dim result As Boolean
result = CBool(u8apiBroker.GetReturnValue())
Dim errMsgRet As String
errMsgRet = CStr(u8apiBroker.GetResult("errMsg"))
MsgBox errMsgRet
End If
u8apiBroker.Disconnect
Set u8apiBroker = Nothing
End If
Exit Sub
ErrHandler:
MsgBox Err.Description
End Sub
|
|