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

How to Transfer file EMS to Thingworx ?

mpatel-21
2-Guest

How to Transfer file EMS to Thingworx ?

Hello Expert ,

I want to transfer file EMS location to Thingworx server both are different server  or upload a file in thingworx from EMS server, Any one please help me out to how to transfer file EMS (Java Code ) to Thingworx in several time. Please let me know any code if you have. Thanks in advance.

Regards,

Mayank

1 ACCEPTED SOLUTION

Accepted Solutions

11 REPLIES 11
PaiChung
22-Sapphire I
(To:mpatel-21)

EMS supports filetransfer. I would utilize that functionality.

Hello,

Here is some Help Center documentation on how to transfer files using the EMS: http://support.ptc.com/cs/help/thingworx_hc/thingworx_edge/index.jspx?id=ems_wsems_topics-c_ems_wsems_configuration_file_transfer&action=show

Hope this helps!

Tori

Thanks Tori , It is helpful to solve my problems.

Tori  ,


If my thingworx install in Linux machine , So how can I set its "in"  or "out"  Thingworx Storage Path for set "in" vertual thing.


Like here : { "In" : "c:\Microserver_5.3.1-win32\microserver\in" },
         {
Out": "c:\Microserver_5.3.1-win32\microserver\out" },


Both path are windows based but i want run in linux machine so how can I set Thingworx Storage Path?


Thanks,

Mayank


Mayank,

Just swap the paths there for Linux paths. You can find the path to the current directory using the pwd command in Linux, but they should look something like: "/home/userrname/microserver/in/". Then, create a directory here called "in": mkdir in. You may need to ensure there are read/write permissions on this folder using chmod also.

Hope this clarifies things a bit,

Tori

Hi ,

I am getting this error after run EMS ( My EMS running in different server and Thingworx running in another server ) So in that I am assigning two virtual path in (Thingworx) and out (EMS),

in -> for Thingworx repository path ( targetPath)

​out -> for Ems file location ( sourcePath )

My source code break in virtual path assign for Thingworx repository. I follow the this tutorial for did this work Digital Media Publisher

Some Question :

1) How can i assign virtual path for cross platform (EMS run on different and Thingworx run on another) ?

2) Is there any steps to registered virtual directory in EMS or Thingworx?

com.thingworx.common.exceptions.InvalidRequestException: File Does Not Exist

        at com.thingworx.communications.client.things.filetransfer.FileTransferV

irtualThing.checkFileExists(FileTransferVirtualThing.java:707)

        at com.thingworx.communications.client.things.filetransfer.FileTransferV

irtualThing.addVirtualDirectory(FileTransferVirtualThing.java:190)

        at com.thingworx.communications.client.things.filetransfer.FileTransferV

irtualThing.addVirtualDirectory(FileTransferVirtualThing.java:195)

        at Tunnel.main(Tunnel.java:117)

 

Thanks,

Mayank

mhollenbach
5-Regular Member
(To:mpatel-21)

Mayank,

I think you might be looking at this incorrectly. Your ThingWorx repository is not defined in the EMS, it is defined with a FileRepository Thing. You will have one by default called SystemRepository that you can use. On the EMS side of things you can define virtual directories for the EMS, not for ThingWorx. The reason you are getting those errors is probably because you are trying to tell the EMS to use a directory for ThingWorx that doesn't exist on the EMS, but this is not what you will want to do anyway so that's okay.

Basically, any virtual directories you want to define on your EMS for your EMS can be done in the config.json file, and any virtual directories you want to define for ThingWorx is done by creating Things based on the FileRepository ThingTemplate.

Meghan

Thanks Meghan it's help me resolve my issue.

Regards,

Mayank

hi Tori,

The link you provide is broken. Could you repair the link? Thanks before

Regards,

Ghifari

supandey
19-Tanzanite
(To:grahadian)

Hi Ghifari, see if this helps Transferring Files through the REST API this is covered in the REST APIs and WS EMS in the Help Center. Additionally you can access it from the PTC Reference Documentation page for WS EMS and check the section Configuring File Transfers

The link has been updated recently. Please find the Edge Help Center here

Top Tags