经典ASP中的SOAP请求

经典ASP中的SOAP请求,soap,vbscript,asp-classic,Soap,Vbscript,Asp Classic,我有以下简单的Soap请求代码。(使用经典ASP) 我已经阅读了很多关于在经典ASP中使用SOAP提要的教程,但它们似乎都不起作用 我尝试以下代码: soapEnvelope = _ "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""" &_ "xmlns:etp=""https://test.mpay24.com/soap/e

我有以下简单的Soap请求代码。(使用经典ASP)

我已经阅读了很多关于在经典ASP中使用SOAP提要的教程,但它们似乎都不起作用

我尝试以下代码:

soapEnvelope = _
            "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""" &_ 
            "xmlns:etp=""https://test.mpay24.com/soap/etp/1.5/ETP.wsdl"">" &_ 
            "<soapenv:Header/>" &_ 
            "       <soapenv:Body>" &_ 
            "       <etp:SelectPayment>" &_ 
            "        <merchantID>XXXXXX</merchantID>" &_ 
            "        <mdxi>" &_ 
            "        &lt;Order&gt;" &_ 
            "        &lt;Tid&gt;cust9126&lt;/Tid&gt;>" &_ 
            "        &lt;Price&gt;10.00&lt;/Price&gt;" &_ 
            "        &lt;/Order&gt;" &_ 
            "        </mdxi>" &_ 
            "        </etp:SelectPayment>" &_ 
            "        </soapenv:Body>" &_ 
            "       </soapenv:Envelope>"

        Set SoapRequest = CreateObject("Microsoft.XMLHTTP")
        Set myXML  =Server.CreateObject("MSXML.DOMDocument") 
        myXML.Async=False 
        SoapRequest.Open "POST", "https://test.mpay24.com/app/bin/etpproxy_v15", False, "user", "password"

        SoapRequest.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
        sSOAPAction = "https://test.mpay24.com/soap/etp/1.5/ETP.wsdl" + "SelectPayment"
        SoapRequest.setRequestHeader "SOAPAction", sSOAPAction

        SoapRequest.send soapEnvelope 
        myResponseText = SoapRequest.responseText
soapEnvelope=_
"" &_ 
"" &_ 
"       " &_ 
"       " &_ 
“XXXXXX”和
"        " &_ 
"命令"及
“Tidcust9126/Tid>”和
“价格10.00/价格”和
“/订单”和
"        " &_ 
"        " &_ 
"        " &_ 
"       "
设置SoapRequest=CreateObject(“Microsoft.XMLHTTP”)
设置myXML=Server.CreateObject(“MSXML.DOMDocument”)
myXML.Async=False
SoapRequest.打开“POST”https://test.mpay24.com/app/bin/etpproxy_v15,False,“用户”,“密码”
SoapRequest.setRequestHeader“内容类型”,“文本/xml;字符集=utf-8”
sSOAPAction=”https://test.mpay24.com/soap/etp/1.5/ETP.wsdl“+”选择付款”
SoapRequest.setRequestHeader“SOAPAction”,sSOAPAction
SoapRequest.send soapEnvelope
myResponseText=SoapRequest.responseText
响应文本为: “SOAP-ENV:ClientMethod'etp:SelectPayment'未实现:无法识别方法名称或命名空间”

我想我的
SoapRequest.setRequestHeader“SOAPAction”为false。

您的
SSAPAction
字符串在我看来有问题您是否缺少
ETP.wsdl
选择付款之间?是的,我尝试了它?之间我也在没有ETP.wsdl字符串的情况下尝试了它。(仅方法名称)您的端点看起来正常,将WSDL文件设置为
SOAPAction
背后的想法是什么?另外,中的字符串串联不使用
+
它使用
&
尝试更改
ssapaction=”https://test.mpay24.com/soap/etp/1.5/ETP.wsdlSelectPayment“
ssapaction=”https://test.mpay24.com/soap/etp/1.5/ETP.wsdl&“选择付款”
(但无意义)或
ssapaction="https://test.mpay24.com/soap/etp/1.5/ETP.wsdl?SelectPayment“