For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 3 replies, 3 voices, and was last updated 14 years, 2 months ago by
support-octavio.
-
AuthorPosts
-
dabbeljuMemberHi Community,
I am facing a problem, where I need help.
I want to load data from my server into my app and store it in local DB. If I do it through YQL I can get data as JSON and XML fine.
Here my YQL request for XML: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%22http%3A%2F%2Fostflut.de%2Fbhc%2Fapp%2Fwrite_feed%2Fnews_rss.xml%22
When I try to load the xml file from my server directly, I do run into a problem, which I do not understand.
The link to the xml file on my server directly is http://ostflut.de/bhc/app/write_feed/news_rss.xml.
The code I use to load the XML is this one:
$.ajax({
type: ‘GET’,
url: ‘http://ostflut.de/bhc/app/write_feed/news_rss.php’,
dataType: ‘xml’,
async: false,
cache: false,
success: function(data) {alert (“success”);},
complete: function(jqXHR, textStatus) {alert (“Complete!”); alert (textStatus);},
error: function(jqXHR, textStatus, errorThrown) {alert (“Error”); alert (textStatus); alert (errorThrown);}
});The error mssage is: Error: NETZWORK_ERR: XMLHttpRequest Exception 101
In Wireshark I do see that the rqeuest is sent correctly and that I do get the XML back.
I did read a lot of articles in the web which do discuss this error message. A lot of answers are about cross domain problems, others say that this call needs to be async and so on.
My thoughts:
I do not see the cross domain problem, because I do not do multiple request in different frameset or whatever. And I do get the data back, as I see in Wireshark.
On the other hand, if save the response from YQL in a file and upload it to my server and use this instead, I do get the same error message which guides me to the point that it must have something to do with my domain.
I think the XML in general is ok, at least if I use validation tools I do not see any errors.
But what else could cause this problem and what is the difference to the request against YQL?
Any ideas and help is very welcome.
Thanks a lot and best regards
ChristianP.S.: I am not a professional programme. So if I did overlook something obviously you can blame me. 😉
May 25, 2012 at 5:29 pm #326390
support-michaelKeymasterMy 1st guess is a cross-domain issue when trying to access your domain. But lets step back a min.
1) are you running a mobione webapp in the Test Center emulator or some custom webapp?
1a) if you are running a mobione webapp, try this quick experiment before running the UI in the Test Center. Go to Window>Settings>Local Web Server and disable it. Then run your webapp in the Test Center. If you view the addressbar the url should be a local file://…. URL. Then try loading your xml file from your site. Does it succeed?
June 7, 2012 at 12:45 pm #326890
dabbeljuMemberHi Wayne,
1a) did fix it for me. So I guess the local Webserver was working somehow as a proxy or something similar?
Thanks for your help.
Best
ChristianJune 7, 2012 at 7:14 pm #326905
support-octavioMemberHi dabbelju,
Thank you for closing the loop. It’s nice to know this worked out for you
-
AuthorPosts
