NuSOAP, sunucu tarafı (php) ve istemci tarafında ASP klasik

2 Cevap php

I am trying to call a web service (using nusoap), which work well when I call it with a php client. It returns a list of mail address.

(Yaklaşık örnekler bol .. php / php veya php / asp.net, vb hakkında web üzerinde vardır)

but, I want now to be able to call this web service with classic ASP

I have found nothing so far, does anyone have successfully implemented such a web service combo: 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.

2 Cevap

Sen Microsoft SOAP Tookit 3.0 indirebilir, ama benim deneyim bir ağrı, çünkü ben bunu önermiyoruz.

Orada this article in CodeProject da, ama ben hiç kullanmıyorum, bu yüzden tavsiye edemez.

Benim sorun için çözüm bulundu. Bu kod benim için çalışıyor

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