[Zebralist] consulting SRU with Ajax + Jquery

Camilo Freire camilofreire at gmail.com
Wed Oct 5 21:05:31 CEST 2011


certainlly you are right, this seems to be the response headers, with the
rest of the answer coming afterwards, but I can't get any other data from
the server. At least my Firebug debugger doesn't shows anything further.

I would like to make two remarks

1) I'm using a GET, not a POST request

2) few seconds after the request have been sent, Firebug shows that the
request have failed (shows the message "*Error* + the url in red") and
JQuery triggers the error event, so, if it hand't occurred and error,
JQuerysupposed that I was the case.

On the other hand I've tried a more standard AJAX GET query, with the same
kind of result. If you could send me an example of correct AJAX answer, I
would appreciate it very much.

Thank you very much

Saludos. Camilo

2011/10/5 John Harrison <john.harrison at liverpool.ac.uk>

> I've never done SRU requests through jQuery, although I have got them
> working using JavaScript XML HTTP request objects directly.
> On Wed, 2011-10-05 at 11:05 -0200, Camilo Freire wrote:
> > The answer given by the SRU server is the following:
> >
> > Content-Length 191
> > Server YAZ/2.1.18
> > Content-Type text/xml
> This looks like merely the HTTP headers. Did you get actual data in the
> response body?
> When I try your request as a GET (rather than POST) request, by encoding
> it as a URL and simply visiting it in a browser (try it yourself), i get
> a valid response reporting 3176 records.:
> http://z3950.loc.gov:7090/voyager?version=1.1&operation=searchRetrieve&query=borges
> This is what I'd expect to see in the response body (responseXML?)
> Good luck
> John
> --
>              '.    ,'.         John Harrison
>             '  `  '  '         University of Liverpool
>  c h e s h i r e  |  3          e: john.harrison at liv.ac.uk
>                  v             w: www.cheshire3.org
>              `-..;.'           t: 0151 7950550
>                ..,     (c)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.indexdata.dk/pipermail/zebralist/attachments/20111005/6dc7e399/attachment.htm>

More information about the Zebralist mailing list