我有这个网络服务:
https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl
Web服务具有bpPayRequest
方法,该方法采用10个参数作为Web服务提供商定义如下:
bpPayRequest(long terminalID, string username, string password, long orderID, long amount, string localDate, string localTime, string additionalData, string callbackURL, long payerID)
我正在使用ASP Classic,这是我的代码:
<%
RedirectURL = "http://" & Request.ServerVariables("SERVER_NAME") & "/Frontend/epayverify_l2.asp"
set oSOAPay = Server.CreateObject("MSSOAP.SoapClient30")
oSOAPay.ClientProperty("ServerHTTPRequest") = True
on error resume next
oSOAPay.mssoapinit(webServiceAddr)
oSOAPay.ConnectorProperty("UseSSL") = False
if err.number <> 0 Then
if DebugMode Then
rwbr err.description
response.end
Else
epayAction = false
this_error = "banknotresponse"
Exit for
End if
End if
on error goto 0
result = oSOAPay.bpPayRequest(_
CLng(str_terminal), _
CStr(M_ID), _
"password", _
CLng(int_orderID), _
CLng(Amount), _
"20130610", _
"102030", _
"", _
CStr(RedirectURL), _
0)
%>
这是result = oSOAPay.bpPayRequest
参数的值:
oSOAPay.bpPayRequest( 709499, "11111", "password", 2, 1000, "20130610", "102030", "", "http://mitranik.com/Frontend/epayverify_l2.asp", 0 )
问题是当我运行此代码时,我收到此错误。
Client:Incorrect number of parameters supplied for SOAP request HRESULT=0x80070057: The parameter is incorrect. - Client:Unspecified client error. HRESULT=0x80070057: The parameter is incorrect.
我在这里错过了一些东西吗?
答案 0 :(得分:1)
Web方法需要9个参数:
但是当你使用它时,你给它10个参数:
参数#8(固定的空字符串)是罪魁祸首,只是摆脱它:
result = oSOAPay.bpPayRequest(_
CLng(str_terminal), _
CStr(M_ID), _
"password", _
CLng(int_orderID), _
CLng(Amount), _
"20130610", _
"102030", _
CStr(RedirectURL), _
0)