SOAP Request in Classic ASP

空扰寡人 提交于 2019-12-25 02:47:07

问题


I have the following simple Soap request code. (using classic ASP)

I've read many tutorials on consuming SOAP feeds in classic ASP, but none of them seem to work at all.

I try the following code:

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 is: "SOAP-ENV:ClientMethod 'etp:SelectPayment' not implemented: method name or namespace not recognized"

I think my SoapRequest.setRequestHeader "SOAPAction" is false.

来源:https://stackoverflow.com/questions/22945505/soap-request-in-classic-asp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!