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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Unable to Parse the XML

vsrilekha
1-Visitor

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

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

Yes it has

Aanjan
12-Amethyst
(To:vsrilekha)

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?

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

Aanjan
12-Amethyst
(To:vsrilekha)

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

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

Thingworx is running on a server, Please help.

Thanks

Srilekha

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

Announcements


Top Tags