Okay so I've received two responses and I'm not exactly 100% clear on what they mean.
So when you say with cross domain AJAX requests must be in Javascript code, does that if I was on the same domain I could use the existing XML system? If not short of rewriting the API to output JSON is there any way to use Qooxdoo with it? Steve Ramage Software Developer IP Applications Solutions Inc Email: [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fabian Jakobs Sent: Monday, May 21, 2007 12:33 AM To: qooxdoo Development Subject: Re: [qooxdoo-devel] Request Question in 0.6.6 Steve Ramage schrieb: > > Weve developed an Ajax application with our (read mine) own built > from scratch JS Interface. Needless to say its crap and Im > investigating rewriting the UI portion from scratch with Qooxdoo. Both > the Application and API are already well defined and work fine, and it > would be preferred if we didnt have to rewrite the client/server > interaction. The current API uses either GET or POST requests and > returns XML data. Our current application runs on a separate web > server from where the Qooxdoo interface is being run. > Cross domain AJAX requests is a special topic. It is only possible with the use of dynamically inserted script tags and the data transferred MUST be JavaScript code. This code is executed in the context of the qooxdoo application. This transferred JS should call the statics method <http://demo.qooxdoo.org/0.7-beta1/apiviewer/#qx.io.remote.ScriptTransport#_ requestFinished> , which will fire the complete event. Best Fabian > I am currently only trying to get the response from the server but > cant seem to get it. > > The code is: > > button1.addEventListener("execute", > > function(e) { > > w1.setStatus('Sending Credentials...'); > > button1.setEnabled(false); > > text1.setEnabled(false); > > text2.setEnabled(false); > > var url = 'http://server/api.php'; > > var ajaxRequest = new qx.io.remote.Request(url,'GET',"text/plain"); > > with (ajaxRequest) > > { > > setAsynchronous(true); > > setRequestHeader("Content-Type","application/x-www-form-urlencoded"); > > setParameter('test','test'); > > setCrossDomain(true); > > addEventListener("completed",function(e) { > > e.getData().getContent(); } ); > > addEventListener("timeout",function(e) { > > alert("App API (" + url + ") did not respond"); > > w1.setStatus('Could not contact server.'); > > button1.setEnabled(true); > > text1.setEnabled(true); > > text2.setEnabled(true); > > } ); > > send(); > > } > > }, > > w1); > > The result is a timeout. > > The qx_log displays: > > 010811 INFO: qx.component.init.InterfaceInitComponent[30]: finalize runtime: 63ms > 011233 DEBUG: qx.component.init.InterfaceInitComponent[30]: preloading hidden images... > 011264 DEBUG: qx.component.init.InterfaceInitComponent[30]: preloading complete > 019857 WARN: qx.io.remote.RequestQueue[409]: Timeout: transport 412 > 019857 WARN: qx.io.remote.RequestQueue[409]: 5484ms > 5000ms > 019872 WARN: qx.io.remote.Exchange[412]: Timeout: implementation 421 > > The weird thing is that a Javascript Error is generated in both > Firefox and IE. In IE it says there is a syntax error on line 1. > Firefox is more descriptive with: > > Error: missing ; before statement > > Source File: > http://server/api.php?_ScriptTransport_id=2&nocache=1179709434718&test=test > > Line: 3, Column: 50 > > Source Code: > > <apierror>AUTH REQUIRED</apierror><apimessage>You are required to > login</apimessage></response> > > The Source Code is the response from the server which is the result I > was expecting back. The server is not actually timing out but is > responding. I havent been able to find an sample code on Ajax > requests for 0.6.6 so I just pieced the above from various mailing > list postings. I did download the full SDK. Any ideas? > > Steve Ramage > Software Developer > Email: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > -- Fabian Jakobs JavaScript Framework Developer 1&1 Internet AG Brauerstraße 48 76135 Karlsruhe Amtsgericht Montabaur HRB 6484 Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss Aufsichtsratsvorsitzender: Michael Scheeren ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
