Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to load and parse an WMT_MS_Capabilities using Javascript. I have unsuccessfully tried severaly ways. I am trying with this file but I always get this error:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///home/frowing/Projects/XMLParsing/testXML.js :: <TOP_LEVEL> :: line 10" data: no]

I hope someone can throw some light on this because I have no idea where to go next.

Thanks!

share|improve this question
    
This looks helpful - koders.com/javascript/… –  Mapperz May 8 '11 at 13:59
add comment

2 Answers

up vote 2 down vote accepted

I expect you'll need a proxy unless that is the site you are running your JavaScript from. See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost for more details.

share|improve this answer
    
If I had debugged with Chrome instead of Firefox, I would have known right away from the error it gives you. Thanks a lot! –  frowing May 9 '11 at 6:17
add comment

The WMT_MS_Capabilities file seems ok. I have validated it twice using the on-line XML validation services http://www.validome.org/xml/ and http://www.xmlvalidation.com/, and in both cases no error was found.

Thus, the error must be somewhere in file:///home/frowing/Projects/XMLParsing/testXML.js.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.