On 23 déc, 15:18, Vishal <vishal.santo...@gmail.com> wrote: > I have an html page on a loaded on xxx.somedomain:301/some.html > > This html has > <script type="text/javascript" language="javascript" src="http:// > yyy.somedomain:301/g-control/gwtc/z/z.nocache.js"> > document.domain = 'somedomain:301'; > </script>
Well, first, this "document.domain" thing won't be executed, it has to be in a separate <script> element (you cannot have both a src="" and inline script). And it would actually have no effect in your case. > and thus has to load up a GWT generated nocache.js. > I have the > <add-linker name="xs"/> > added to the GWT.xml to allow Cross Domain Scripting. > > I am able to execute the nocache.js , but any RPC fail with > > com.google.gwt.http.client.RequestPermissionException: > The URLhttp://yyy.somedomain:301/g-control/actionservice.foundation > is invalid or violates the same-origin security restrictionCaused by: > com.google.gwt.http.client.RequestException: > > What am I doing wrong here ? It just cannot work that way.You'd have to make requests to xxx.somedomain:301 (either hosting your RPC servlets on xxx.somedomain or setting up a "proxy" on xxx.somedomain to relay requests to yyy.somedomain); the "xs" linker only allows you to load the GWT app from another domain, but it doesn't bypass the Same-Origin Policy. See http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html#What_is_the_Same_Origin_Policy,_and_how_does_it_affect_GWT? -- 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-tool...@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.