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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to load an xml file from the system in the script. I tried:

ssingh-31
1-Newbie

How to load an xml file from the system in the script. I tried:

var params = {

url:"file://C:/Users/ShaurabhKumar/Documents/MATLAB/AGENT.xml",

timeout:160

};

Got Error:

Wrapped org.apache.http.client.ClientProtocolException Cause: null

I am trying to read an xml file on my system.

Is there any other way to do the same?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:ssingh-31)

Uploaded file would only be a snapshot.

if you have something that is updating the XML file continuously, if you can, you could post the incremental updates to Thingworx using either the Edge MicroServer or the REST API

View solution in original post

5 REPLIES 5
PaiChung
22-Sapphire I
(To:ssingh-31)

Not sure if that is possible, could be a variety of reasons, I recommend you create a mashup and do an upload of the file to a repository and process it from there.

Yes I believe that would be one way of doing it. But what if the xml file keeps updating with time(real time data). If i store it in the repository would it simply store a version of it?

PaiChung
22-Sapphire I
(To:ssingh-31)

Uploaded file would only be a snapshot.

if you have something that is updating the XML file continuously, if you can, you could post the incremental updates to Thingworx using either the Edge MicroServer or the REST API

Hi Pai,

Since i am new to this, Could you please guide me towards a tutorial perhaps or some sort of help for implementing REST API in thingworx? Since i need to read an xml from my system through the service javascript. or perhaps you could guide me through the steps.

Thank you

PaiChung
22-Sapphire I
(To:ssingh-31)

Thingworx Fundamentals has a section on this.

Top Tags