cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Parse the XML

Newbie

Unable to Parse the XML

Hi all  I'm using Thingworx 7.4 currently and I'm trying to Parse an Xml file below is my code

var params = { 

proxyScheme: undefined /* STRING */, 

headers: undefined /* JSON */, 

ignoreSSLErrors: undefined /* BOOLEAN */, 

useNTLM: undefined /* BOOLEAN */, 

workstation: undefined /* STRING */, 

useProxy: undefined /* BOOLEAN */, 

withCookies: undefined /* BOOLEAN */, 

proxyHost: undefined /* STRING */, 

url: "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx/GetCountriesAvailable" /* STRING */, 

timeout: undefined /* NUMBER */, 

proxyPort: undefined /* INTEGER */, 

password: undefined /* STRING */, 

domain: undefined /* STRING */, 

username: undefined /* STRING */ 

}; 

 

// result: XML 

var result = Resources["ContentLoaderFunctions"].GetXML(params);

I'm getting this error.

Please help me fix it

7 REPLIES 7

Re: Unable to Parse the XML

Your TW Server has DNS resolution? As I've tested your code on my TW Server and it works smoothly.

Re: Unable to Parse the XML

Yes it has

Re: Unable to Parse the XML

Vemuri, the only time I get that error is if I give an invalid url, like holidaywebservices instead of holidaywebservice. Can you access that url link you're using in your service from the server that is hosting ThingWorx?

Re: Unable to Parse the XML

No I'm unable to access the url link that is being used in my service from the server that is hosting ThingWorx.

Re: Unable to Parse the XML

That might be the problem then. Is that website/ link blocked or blacklisted? Please try using a different link, maybe something like this one.

Re: Unable to Parse the XML

Even this link does not work in the server that we are using here.

Thingworx is running on a server, Please help.

Thanks

Srilekha

Highlighted

Re: Unable to Parse the XML

Aanjan Ravi Below is the screen shot of the error that I'm getting while passing the url link that you suggested.

Please help, I'm not sure what is the error.

I tried getText, but the error is the same as stated above.

Thanks