XMLHTTP Wrong Response
-
Hi All, i am posting one url to server and expecting some meaningful data in response but i am getting one dummy xml: <<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">soap:Body<GenerateSearchResponse xmlns="http://intuitivesystems"><GenerateSearchResult><SearchMode>Hotel</SearchMode><PropertyCount>135</PropertyCount><FlightCount>0</FlightCount><TotalFlightCount>0</TotalFlightCount></GenerateSearchResult></GenerateSearchResponse></soap:Body></soap:Envelope>> Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct. and the code which i am using is:
strurl = "http://www.lowcostholidays.com/webservices/search.asmx"
xmlHttp.Open "POST", strurl, False xmlHttp.setRequestHeader("Accept", "\*/\*") xmlHttp.setRequestHeader"Referer", "http://www.lowcostholidays.com") xmlHttp.setRequestHeader("Content-Type", "text/xml") xmlHttp.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)") xmlHttp.setRequestHeader("Host", "www.lowcostholidays.com") xmlHttp.setRequestHeader("Connection", "Keep-Alive") xmlHttp.setRequestHeader("Cache-Control", "no-cache") xmlHttp.setRequestHeader("Cookie", strCookie(it)) xmlHttp.send (strpostdata)
Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....
-
Hi All, i am posting one url to server and expecting some meaningful data in response but i am getting one dummy xml: <<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">soap:Body<GenerateSearchResponse xmlns="http://intuitivesystems"><GenerateSearchResult><SearchMode>Hotel</SearchMode><PropertyCount>135</PropertyCount><FlightCount>0</FlightCount><TotalFlightCount>0</TotalFlightCount></GenerateSearchResult></GenerateSearchResponse></soap:Body></soap:Envelope>> Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct. and the code which i am using is:
strurl = "http://www.lowcostholidays.com/webservices/search.asmx"
xmlHttp.Open "POST", strurl, False xmlHttp.setRequestHeader("Accept", "\*/\*") xmlHttp.setRequestHeader"Referer", "http://www.lowcostholidays.com") xmlHttp.setRequestHeader("Content-Type", "text/xml") xmlHttp.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)") xmlHttp.setRequestHeader("Host", "www.lowcostholidays.com") xmlHttp.setRequestHeader("Connection", "Keep-Alive") xmlHttp.setRequestHeader("Cache-Control", "no-cache") xmlHttp.setRequestHeader("Cookie", strCookie(it)) xmlHttp.send (strpostdata)
Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....
What you want to know...? If you want to confirm that is 200 means correct response,then yes ,as far as i m concerned (since i m using the same in my script) 200 means the same.
It's not enough to be the best, when you have capability to be great....
-
What you want to know...? If you want to confirm that is 200 means correct response,then yes ,as far as i m concerned (since i m using the same in my script) 200 means the same.
It's not enough to be the best, when you have capability to be great....
Actually i am expecting view source of a page in response of the request but i am getting some xml which i shown in my question..... i am aware of the fact that 200 means success but i am not sure that if status is 200 then the server will give you proper response... means is there any othe thing which i missed in setting header or something else in my code which can cause improper response.....
Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....
-
Actually i am expecting view source of a page in response of the request but i am getting some xml which i shown in my question..... i am aware of the fact that 200 means success but i am not sure that if status is 200 then the server will give you proper response... means is there any othe thing which i missed in setting header or something else in my code which can cause improper response.....
Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....
Have you expected html data in response...?? Try setting content type as "text/html" instead of "text/xml" ,hope this will we helpful.
It's not enough to be the best, when you have capability to be great....
-
Hi All, i am posting one url to server and expecting some meaningful data in response but i am getting one dummy xml: <<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">soap:Body<GenerateSearchResponse xmlns="http://intuitivesystems"><GenerateSearchResult><SearchMode>Hotel</SearchMode><PropertyCount>135</PropertyCount><FlightCount>0</FlightCount><TotalFlightCount>0</TotalFlightCount></GenerateSearchResult></GenerateSearchResponse></soap:Body></soap:Envelope>> Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct. and the code which i am using is:
strurl = "http://www.lowcostholidays.com/webservices/search.asmx"
xmlHttp.Open "POST", strurl, False xmlHttp.setRequestHeader("Accept", "\*/\*") xmlHttp.setRequestHeader"Referer", "http://www.lowcostholidays.com") xmlHttp.setRequestHeader("Content-Type", "text/xml") xmlHttp.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)") xmlHttp.setRequestHeader("Host", "www.lowcostholidays.com") xmlHttp.setRequestHeader("Connection", "Keep-Alive") xmlHttp.setRequestHeader("Cache-Control", "no-cache") xmlHttp.setRequestHeader("Cookie", strCookie(it)) xmlHttp.send (strpostdata)
Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....
Why do you think that's 'dummy' XML? It looks like a perfectly adequate web service response to me. What are you expecting it to return?
Ash_VCPP wrote:
Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct.
A status of 200 means that the server believes it serviced your request suitably and returned the information you wanted. So from that view, yes it means correctness. Of course, whether you were asking for the right thing is another matter.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Why do you think that's 'dummy' XML? It looks like a perfectly adequate web service response to me. What are you expecting it to return?
Ash_VCPP wrote:
Can anyone tell me that if status of the request is 200 then the response which i get will surely be correct.
A status of 200 means that the server believes it serviced your request suitably and returned the information you wanted. So from that view, yes it means correctness. Of course, whether you were asking for the right thing is another matter.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p