经典ASP中的SOAP请求

时间:2014-04-08 18:37:04

标签: 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/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

responseText是: “SOAP-ENV:ClientMethod'etp:SelectPayment'未实现:方法名称或名称空间无法识别”

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

0 个答案:

没有答案