What is the full url that the cgi is at, and what is the url in hosted mode?
I can't see anything else it can be but SOP. Try putting a plain text file in the /public/ directory (or the doc root if using -noserver) and I think you'll find it will pick it up. You might have to restart hosted mode for it to pick up the new file. Ian http://examples.roughian.com 2009/11/10 dk <dean.kar...@gmail.com> > > Hi RPB, > > Thanks for the links. There is a lot of good info in there. I don't > think my issue is with SOP though. There is something wacky about > what I am doing this time and I am not seeing it. > > So, here is a more complete description of my environment: my > development platform is a recent Ubuntu distro with eclipse 3.4.2 > and GWT 1.7.1. The target platform is running RHEL 5.4 and Apache-2. > > I have changed/rewritten the code several times today and nothing > is working. The section of the GWT code that should take in the JSON > data now looks like: > > public void getInfo() { > RequestBuilder req; > LOG("getInfo:a"); > > req = new RequestBuilder(RequestBuilder.POST, > URL.encode(baseURL + "archive.cgi")); > LOG("getInfo:a1"); > req.setHeader("Content-Type", > "application/x-www-form-urlencoded"); > LOG("getInfo:a3"); > try { > req.sendRequest(null, new RequestCallback() { > public void onError(Request request, Throwable e) { > Window.alert("getInfo failed: " + e.toString()); > } > > public void onResponseReceived(Request request, > Response response) { > JSONObject Info; > if (response.getStatusCode() == 200) { > try { > LOG("getInfo:onResponseReceived:a:" + > response.getText()); > Info = JSONParser.parse(response.getText() > ).isObject > (); > } > catch (NullPointerException e) { > LOG("getInfo:onResponseReceived:e1:"+ > e.getMessage()); > throw new RuntimeException( > "Failed to send JSON > request"); > } > catch(IllegalArgumentException e) { > LOG("getInfo:onResponseReceived:e2:"+ > e.getMessage()); > throw new RuntimeException( > "Failed to send JSON > request"); > } > catch(Exception e) { > LOG("getInfo:onResponseReceived:e3:"+ > e.getMessage()); > throw new RuntimeException( > "Failed to send JSON > request"); > } > LOG("getInfo:onResponseReceived:b"); > > if (Info == null) { > throw new RuntimeException( > "Get info returned > null"); > } > > LOG("getInfo:onResponseReceived:c"); > refreshList(Info); > LOG("getInfo:onResponseReceived:d"); > } else { > LOG("getInfo:onResponseReceived:f:"+ > response.getStatusText()); > } > } > }); > } catch (RequestException e) { > // TODO Auto-generated catch block > LOG("getInfo:b"+e.getMessage()); > } > LOG("getInfo:a4"); > } > > > A valid URL to point this to is: > > http://apache-dev.itg.beckman.illinois.edu/communications/forum2/archive.cgi > > the "LOG()" call are going to a JSNI method that calls "console.log()" > for FireBug. > > At this instant the sendRequest() method is not being fired at all. > > I have used sendRequest with null, empty ("") and dummy data values > ("dummy=dummy"). I have tried to use the send() method instead of > sendRequest() and have tried the setRequestData() method with send(). > I have added and removed various header arguments to set the encoding > and the "Accept" pragmas in this code and in my CGI script. I have > had both expect content-types of: > > text/plain > text/javascript > application/javascript > application/json > > I have set the request type above to both GET and POST. > I have set a request header to: > > req.setHeader("Content-Type", "application/x-www-form- > urlencoded"); > > I have deleted the resulting "source" dir in the war directory. > > many hours ago FireBug would show a connection in the console with > a return status of 200 but an "error" icon as well. You could see > request and response headers but no JSON payload. You could open > the request in another browser and see the JSON string. You could > point your browser to the archive.cgi URL and see the JSON string > but RequestBuilder does not seem to be actually sucking the data in. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---