Did your host page come from http://spidev.alisoft.com? If not, then you are running into an issue with the Browsers Same Origin Policy (SOP) which is basically a safety feature that prevents you from making XMLHTTPRequests to domains that differ from the one the host page came from.
-jason On Oct 7, 2008, at 4:03 AM, mack wrote: > > Hello, > I am a new member in gwt. These days I want to develop a > problem and send the HttpRequest by RequestBuilder . The response > state is 200,but can not receive anything. > > the link is : > > http://sipdev.alisoft.com/sip/rest?sip_timestamp=2008-10-07+17%3A33%3A19&sip_appkey=15156&sip_sign=925FF9BADDBAA0F65E7A70634B301F01&fields=created%2Cnick&nick=alipublic01&sip_apiname=taobao.user.get&sip_sessionid=d8ee85a9f99a4dd5901dd88aa1a687cb&format=xml&v=1.0 > > it can be render xml by the browser . > > My code: > > String url = "http://sipdev.alisoft.com/sip/rest? > sip_timestamp > = > 2008 > -10 > -07 > + > 17 > %3A33 > %3A19 > &sip_appkey > =15156&sip_sign=925FF9BADDBAA0F65E7A70634B301F01&fields=created > %2Cnick > &nick > = > alipublic01 > &sip_apiname > = > taobao > .user > .get&sip_sessionid=d8ee85a9f99a4dd5901dd88aa1a687cb&format=xml&v=1.0"; > > RequestBuilder builder = new > RequestBuilder(RequestBuilder.GET, URL.encode(url)); > > Window.alert("readay sendRequest"); > > try { > > Request request = builder.sendRequest(null, new > RequestCallback() { > > public void onError(Request request, Throwable > exception) { > Window.alert("sedRequest onError"); > } > > public void onResponseReceived(Request request, > Response response) { > Window.alert("sedRequest onSuccess"); > > Window.alert(String.valueOf(response.getStatusCode())); > if (200 == response.getStatusCode()) { > try { > System.out.println(response.getText()); > > > } catch (DOMException e) { > Window.alert("Could not parse XML > document."); > } > > > } else { > // Handle the error. Can get the status text > from > } > } > }); > } catch (RequestException e) { > // Couldn't connect to server > } > > Could you help me? Thank you . > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
