Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SOAP request not returning response

Status
Not open for further replies.

steveboohoo

IS-IT--Management
Nov 10, 2015
2
0
0
GB
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
 
Not sure if I fully understand your requirement. I ran your code and just as expected, I was able to get the textual content of the WSDL.
 
Hi what is should return is all the attributes for product code MZZ82609. I spotted the end point is wrong it should be but this just returns a 500 error

I can get the same request to work in SOAPUI and also with SOAPAction as urn:VendaProducts#VendaRetrieveProduct how can I get this to work in VBS?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top