Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Being new to ThingWorx I´m trying to follow an example to retrieve data using the 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.thingworx.com/feed" /* STRING */,
timeout: undefined /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: XML
var xmlPage = Resources["ContentLoaderFunctions"].GetXML(params);
var params = {
infoTableName : "InfoTable",
dataShapeName : "ThingWorxFeedData"
};
var result = Resources["InfotableFunctions"].CreateInfoTableFromDataShape(params);
for each (var item in xmlPage.channel.item){
var row = new Object();
row.title = item.title;
row.link = item.link;
result.AddRow(row);
}
where ThingWorxFeedData is a defined existing DataShape.
When I test the service the error message below is the result:
Error executing service
Wrapped org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true. Cause: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
Please advise, what do I do now?
I´m running ThingWorx in a browser over VPN to a SI installation in our local office.
The url "http://www.thingworx.com/feed" has been removed. So, please use other rss feed to get your job done. I recommend you to use google news feed instead since that is pretty persistent and its url is "https://news.google.com/news/feeds".
And you used same variable name "params" twice. I recommend you not to use duplicate variable names in one script.
Regards,
Daniel
Me too getting a same error.
HoweverWrapped org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true. Cause: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
However I ran run my web services through SOAPUI without any issues.
Having trouble here in thingworx.