[英]Nusoap, server side (php) and client side ASP classic
I am trying to call a web service (using nusoap ), which work well when I call it with a php client .
我正在尝试调用网络服务 (使用nusoap ),当我用php client调用它时,它可以很好地工作。 It returns a list of mail address.
它返回邮件地址列表。
(there are plenty of examples around on the web about php/php or php/asp.net, etc...) (网络上有很多关于php / php或php / asp.net等的示例。)
but, I want now to be able to call this web service with classic ASP
但是,我现在希望能够使用经典ASP调用此Web服务
I have found nothing so far, does anyone have successfully implemented such a web service combo: php(server)/asp classic (client)? 到目前为止,我什么都没找到,是否有人成功实现了这样的Web服务组合:php(server)/ asp classic(client)? Or know how to do it?
还是知道该怎么做? If the answer is yes, I'd love to hear how you did that!
如果答案是肯定的,我很想听听你是如何做到的! Thank you very much.
非常感谢你。
I found the solution to my problem. 我找到了解决我问题的方法。 This code is working for me
该代码对我有用
url = "http://dev_api/service.php"
SOAPParameters = ""
SOAPParameters = " <param1>text1</param1>"
SOAPParameters = SOAPParameters & " <param2>text2</param2>"
SOAPParameters = SOAPParameters & " <param3>text3</param3>"
SOAPRequest = "<?xml version='1.0' encoding='utf-8'?>"
SOAPRequest = SOAPRequest & "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"
SOAPRequest = SOAPRequest & " <soap:Body>"
SOAPRequest = SOAPRequest & " <search>"
SOAPRequest = SOAPRequest & SOAPParameters
SOAPRequest = SOAPRequest & " </search>"
SOAPRequest = SOAPRequest & " </soap:Body>"
SOAPRequest = SOAPRequest & " </soap:Envelope>"
Set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "text/xml;charset=utf-8"
xmlhttp.setRequestHeader "Content-Length", LEN(SOAPRequest)
xmlhttp.setRequestHeader "SOAPAction", "http://dev_api/service.php"
xmlhttp.Send (SOAPRequest)
Response.Write xmlhttp.responseXML.xml
You can download the Microsoft SOAP Tookit 3.0 , but I don't recommend it because, in my experience is a pain. 您可以下载Microsoft SOAP Tookit 3.0 ,但我不推荐这样做,因为根据我的经验,这很痛苦。
There is also this article in CodeProject , but I never use it, so can't recommend. CodeProject中也有这篇文章 ,但是我从不使用它,因此不推荐使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.