Skip to main content
1-Visitor
July 20, 2017
Question

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

    1-Visitor
    July 21, 2017

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

    Translate
    vsrilekha1-VisitorAuthor
    1-Visitor
    July 21, 2017

    Yes it has

    Translate
    5-Regular Member
    July 21, 2017

    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?

    Translate
    vsrilekha1-VisitorAuthor
    1-Visitor
    July 24, 2017

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

    Translate
    5-Regular Member
    July 24, 2017

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

    Translate
    vsrilekha1-VisitorAuthor
    1-Visitor
    August 25, 2017

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

    Thingworx is running on a server, Please help.

    Thanks

    Srilekha

    Translate