Salve.
sto utilizzando prototypejs per avere tutti i metodi dell'html quando faccio le richieste (put post delete create) in modo da utilizzarli con un servizio rest.
ora, sto provando a fare un get, la funzione è questa:
a questo indirizzo (rest service): http://localhost:8080/Rest/resources/restTest/stefanocodice:function get(){ new Ajax.Request('http://localhost:8080/Rest/resources/restTest/stefano', { method:'get', onSuccess: function(response){ alert("Success! \n\n" + response.responseXML); } }); }
ho questo xml (ho letto qui http://www.sergiopereira.com/article...ingAjaxRequest ):
con firebug vedo che la risposta è corretta. il problema è che l'alert su responseXML da null.codice:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ajax-response> <response> <a>stefano</a> aaaa </response> </ajax-response>
qualcuno sa aiutarmi?