steveboohoo
IS-IT--Management
Hi trying to get this to work? The request below works in SOAPui but it just returns a response that is similiar if you opened the WDSL in your browser?
strURL = "strResponse = "<soap:Envelope xmlns:soap="" xmlns:soapenc="" xmlns:tns=""urn:VendaProducts"" xmlns:types=""urn:VendaProducts/encodedTypes"" xmlns:xsi="" xmlns:xsd="" _
" <soap:Body soap:encodingStyle="" & _
" <tns:VendaRetrieveProduct>" & _
" <email xsi:type=""xsd:string"">steve.roberts@boohoo.com</email>"& _
" <password xsi:type=""xsd:string"">somepassword</password>"& _
" <bsref xsi:type=""xsd:string"">boohoo</bsref>"& _
" <skuElements href=""#id1"" />"& _
" </tns:VendaRetrieveProduct>"& _
" <soapenc:Array id=""id1"" soapenc:arrayType=""tns:queryElement[1]"">"& _
" <Item href=""#id2""/>"& _
" </soapenc:Array>"& _
" <tns:queryElement id=""id2"" xsi:type=""tns:queryElement"">"& _
" <sku xsi:type=""xsd:string"">mzz82609</sku>"& _
" </tns:queryElement>"& _
" </soap:Body>"& _
" </soap:Envelope>"
dim http
set http=createObject("MSXML2.ServerXMLHTTP")
http.open "Get",strUrl,false
http.setRequestHeader "Content-Type","text/xml"
http.send strResponse
If http.Status = 200 Then
WScript.Echo "OK"
WScript.Echo http.responseText
else
WScript.Echo "ERRCODE : " & http.status
End If
strURL = "strResponse = "<soap:Envelope xmlns:soap="" xmlns:soapenc="" xmlns:tns=""urn:VendaProducts"" xmlns:types=""urn:VendaProducts/encodedTypes"" xmlns:xsi="" xmlns:xsd="" _
" <soap:Body soap:encodingStyle="" & _
" <tns:VendaRetrieveProduct>" & _
" <email xsi:type=""xsd:string"">steve.roberts@boohoo.com</email>"& _
" <password xsi:type=""xsd:string"">somepassword</password>"& _
" <bsref xsi:type=""xsd:string"">boohoo</bsref>"& _
" <skuElements href=""#id1"" />"& _
" </tns:VendaRetrieveProduct>"& _
" <soapenc:Array id=""id1"" soapenc:arrayType=""tns:queryElement[1]"">"& _
" <Item href=""#id2""/>"& _
" </soapenc:Array>"& _
" <tns:queryElement id=""id2"" xsi:type=""tns:queryElement"">"& _
" <sku xsi:type=""xsd:string"">mzz82609</sku>"& _
" </tns:queryElement>"& _
" </soap:Body>"& _
" </soap:Envelope>"
dim http
set http=createObject("MSXML2.ServerXMLHTTP")
http.open "Get",strUrl,false
http.setRequestHeader "Content-Type","text/xml"
http.send strResponse
If http.Status = 200 Then
WScript.Echo "OK"
WScript.Echo http.responseText
else
WScript.Echo "ERRCODE : " & http.status
End If