Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. XMLHTTP Wrong Response

XMLHTTP Wrong Response

Scheduled Pinned Locked Moved C / C++ / MFC
xmlcsharpdotnetwcfcom
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ash_VCPP
    wrote on last edited by
    #1

    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.....

    P S 2 Replies Last reply
    0
    • A Ash_VCPP

      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.....

      P Offline
      P Offline
      Pavan_Putra
      wrote on last edited by
      #2

      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....

      A 1 Reply Last reply
      0
      • P Pavan_Putra

        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....

        A Offline
        A Offline
        Ash_VCPP
        wrote on last edited by
        #3

        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.....

        P 1 Reply Last reply
        0
        • A Ash_VCPP

          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.....

          P Offline
          P Offline
          Pavan_Putra
          wrote on last edited by
          #4

          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....

          1 Reply Last reply
          0
          • A Ash_VCPP

            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.....

            S Offline
            S Offline
            Stuart Dootson
            wrote on last edited by
            #5

            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

            A 1 Reply Last reply
            0
            • S Stuart Dootson

              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

              A Offline
              A Offline
              Ash_VCPP
              wrote on last edited by
              #6

              Thanks for the reply.....So now it seems that i must be asking for something wrong from the server, I think i need to look after urls which i am posting to server.

              Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups