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 called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

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

ssingh-31
1-Visitor

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

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.

Announcements


Top Tags