|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Pete_Zed in SOAP, Web Languages/Standards, PHP for Windows
I have been using an asp classic script that allows me to pull product images and information down from a SOAP server. It is working brilliantly. But now, I want to branch out and change my web server to use PHP instead of ASP.
Can someone point me in the right direction on how to convert my current script to PHP please? Thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
|
<%
Dim objXMLHTTP : SET objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0")
Dim objOutputXMLDoc : Set objOutputXMLDoc = Server.CreateObject("MSXML.DOMDocument")
Dim sXml
Dim strMethodPkg
Dim strMethodResultXML
Dim catID : catID = request("catID")
Dim Html_Strip : Html_Strip = 1
strMethodPkg ="<?xml version=""1.0"" encoding=""utf-8""?>"
strMethodPkg = strMethodPkg &"<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/"">"
strMethodPkg = strMethodPkg & "<soap:Body>"
strMethodPkg = strMethodPkg & "<Product_List_Xml xmlns=""http://www.estaronline.com/webservices/"">"
strMethodPkg = strMethodPkg & "<catID>" & catID &"</catID>"
strMethodPkg = strMethodPkg & "<Html_Strip>" & Html_Strip & "</Html_Strip>"
strMethodPkg = strMethodPkg & "</Product_List_Xml></soap:Body></soap:Envelope>"
objXMLHTTP.open "post", "http://www.champions.co.nz/shop/products2.asmx", False
objXMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objXMLHTTP.setRequestHeader "Content-Length", Len(strMethodPkg)
objXMLHTTP.setRequestHeader "SOAPAction", "http://www.estaronline.com/webservices/Product_List_Xml"
Call objXMLHTTP.send(strMethodPkg)
strMethodResultXML = objXMLHTTP.responseText
objOutputXMLDoc.LoadXml(strMethodResultXML)
sXml = objOutputXMLDoc.SelectSingleNode("//Product_List_XmlResult").ChildNodes(0).xml
Dim oXML
Set oXML = Server.CreateObject("MSXML2.DOMDocument.3.0")
Dim oXSL
Set oXSL= Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
Dim oTmpl
Set oTmpl= Server.CreateObject("Msxml2.XSLTemplate.3.0")
Dim oProc
oXSL.async = false
oXSL.load(Server.MapPath("product.xslt"))
oXML.LoadXml(sXml)
oTmpl.stylesheet = oXSL
Set oProc= oTmpl.createProcessor()
oProc.input = oXML
oProc.addParameter "catID", catID
oProc.output = Response
Dim sProduct
oProc.transform()
%>
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625