empty responseXML from XMLHttpRequest with no parse error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lan Vuong

    empty responseXML from XMLHttpRequest with no parse error

    I am using the XMLHttpRequest object to get an XML response from a
    servlet. I check the readyState (4) on my asynchronous call and also
    check the parseError.erro rCode (0). Everything seems to work except
    that when I retrieve the responseXML it is an empty document.

    Does anyone have other ideas on what's going wrong?

    Thanks!
  • Martin Honnen

    #2
    Re: empty responseXML from XMLHttpRequest with no parse error



    Lan Vuong wrote:
    [color=blue]
    > I am using the XMLHttpRequest object to get an XML response from a
    > servlet. I check the readyState (4) on my asynchronous call and also
    > check the parseError.erro rCode (0). Everything seems to work except
    > that when I retrieve the responseXML it is an empty document.
    >
    > Does anyone have other ideas on what's going wrong?[/color]

    Does that servlet have a public URL? Is so post it then we can try to
    figure out what could be wrong. Maybe the servlet doesn't send the XML
    as text/xml or application/xml?

    --

    Martin Honnen


    Comment

    • Lan Vuong

      #3
      Re: empty responseXML from XMLHttpRequest with no parse error

      Martin Honnen <mahotrash@yaho o.de> wrote in message news:<40893cdd$ 1@olaf.komtel.n et>...[color=blue]
      > Lan Vuong wrote:
      >[color=green]
      > > I am using the XMLHttpRequest object to get an XML response from a
      > > servlet. I check the readyState (4) on my asynchronous call and also
      > > check the parseError.erro rCode (0). Everything seems to work except
      > > that when I retrieve the responseXML it is an empty document.
      > >
      > > Does anyone have other ideas on what's going wrong?[/color]
      >
      > Does that servlet have a public URL? Is so post it then we can try to
      > figure out what could be wrong. Maybe the servlet doesn't send the XML
      > as text/xml or application/xml?[/color]

      Hi Martin,

      I checked the servlet and explicitly set the Content-Type to text/xml
      and it seems to get the responseXML properly. Thanks for the tip.

      Comment

      Working...