Cross Site XML-HTTP?

2010-06-11 Thread Quu
I want to, inside of my GWT application, load an XML document from a
different server then where the base page is from. My page is on
server A, and the GWT compiled javascript is on a different server,
location B. The XML I am trying to read is at the same location, B, so
why can't the JS loaded from there access ti with out tripping the SOP
error?.

I used to be able to load XML from a remote site as long as the .html
file hosting the GWT app had a link to an image from the same location
as the XML. This worked in at least 1.7 of GWT, though I suspect it is
more the fact that I have a newer web browser since then.

I have looked at 
http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html
and I don't think I can specifically use any of the tricks there. They
seam to be JSON specific, and require a smart backend to append the
callback to the JSON returned text.

-- 
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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-06 Thread Quu
ok... when i added the add-linker name=xs/ tag to my gwt.xml and
now the code executes remotly...

but i can't read any data files remotely


I have the page (html, css, and images) located at
http://quutar.110mb.com/RemoteTest/STOPlanner.html

and the compiled javascript and xml data source located at
http://otakuvideo.com/~quu/stoplanner/

the page is able to load and execute the javascript from the remote
server, but when that javascript attempts to read the xml, i get an
http response 0
The links referenced earlier show that you can make remote JSON
requests, but i am not sure how to leverage the native code wrapper to
make it http compatiblee

and even then... shouldn't the javascript be able to read from the
same directory it is in? the xml and the javascript is in the same
directory

-- 
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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-06 Thread Quu
my previous reply seams to have been eaten

I added the add-linker name=xs/ tag to my gwt.xml and the code is
now executing from the remote machine

I am running into another SOP issue

the webpage is the html, csss, and images are at
http://quutar.110mb.com/RemoteTest/STOPlanner.html

while the javascript and xml data source is at
http://otakuvideo.com/~quu/stoplanner/

the javascript is able to load and execute fine... but when it tries
to load the xml document via http, i get an http code 0, which in the
past has told me that the SOP policy was being triggered.

there is an example on how to make remote JSON requests, but I am not
sure how I would translate that to http/xml requests

and what is strange... the xml is i the same directory as the
javascript, so it should be readable, as it is the same origin

-- 
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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-06 Thread Quu
this might be a new thing for GWT 2
some of the older GWT apps i wrote, with 1.7 and previous were more
flexible in the URLs i could load. where previously I used to be able
to load xml documents with out any path info, as long as they were in
the same directly as the html, now i have to have the path info

-- 
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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-06 Thread Quu
I tried adding the following to my html document
iframe src=http://otakuvideo.com/~quu/stoplanner/STOPlanner.xml;
id=__data_loading tabIndex='-1' style=position:absolute;width:
0;height:0;border:0/iframe
hoping that maybe it would then be considered Same as Source
I even load an image from the remote site, to see if that would allow
the xml document to be read

the xml is in the same directory, same domain, same path as the
javascript, but for some reason it is triggering the SOP limitation

-- 
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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-06 Thread Quu
so far the only solution i can think of, is to write a java object
that has all the values in the XML hard coded... so it never actually
loads the xml via http... which seams a tad extreme

-- 
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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-06 Thread Quu
I am trying to load the XML document into an iframe and then possibly
read the iframe, but it does not seam to be working
if i do a RootPanel.get(ID) all i can get is the html of the iframe
element, not the contents
and i then get the element of that returned root panel, i don't get
anything from the text contents or the inner html

i can see the contents on the page... just not in 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.



Re: Hosting the GWT JavaScript Files on a remote machine?

2010-05-05 Thread Quu
 You're probably running into the same origin policy. If possible, use a
 bootstrap routine on the HTML page that loads from otakuvideo.com in a
 frame.

this may sound strange, but how do I do that?

-- 
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.



Re: Passing data from static HTML to GWT

2010-03-03 Thread Quu
thank you very much. I like this solution better.

On Mar 2, 4:36 am, Martin Trummer martin.trum...@24act.at wrote:
 take a look at 
 Dictionaryhttp://gwt.google.com/samples/Showcase/Showcase.html#!CwDictionaryExa...http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...

 On 1 Mrz., 20:00, Quu otakuvi...@gmail.com wrote:

  Is there a clean or elegant way to pass configuration data from the
  page that is hosting my GWT application into GWT itself?

  right now I use the following to pass info from the page to the app
  in the HTML (PHP actually, but HTML when it reaches the client) I do
  something like the following
          script
                  window.dataXMLURL = /stoplanner/STOPlanner.xml;
          /script

  and then in my java app, I have the following function to match
          public static native String getXMLSourceLocation() /*-{
                  return $wnd.dataXMLURL;
          }-*/;

  is there a cleaner or easier way to give configuration information to
  my GWT application?

-- 
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.



Passing data from static HTML to GWT

2010-03-01 Thread Quu
Is there a clean or elegant way to pass configuration data from the
page that is hosting my GWT application into GWT itself?

right now I use the following to pass info from the page to the app
in the HTML (PHP actually, but HTML when it reaches the client) I do
something like the following
script
window.dataXMLURL = /stoplanner/STOPlanner.xml;
/script


and then in my java app, I have the following function to match
public static native String getXMLSourceLocation() /*-{
return $wnd.dataXMLURL;
}-*/;

is there a cleaner or easier way to give configuration information to
my GWT application?

-- 
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.