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

How to send a text file from a client running java sdk to thingworx platform?

Highlighted
Newbie

How to send a text file from a client running java sdk to thingworx platform?

Hello,

     Please guide me to send a text file using java sdk to thingworx platform

4 REPLIES 4

Re: How to send a text file from a client running java sdk to thingworx platform?

Hi... you can check FileTransferVirtualThing API

It's in the com.thingworx.communications.client.things.filetransfer package

There's an API overview in your Java SDK zip under doc/html - just open the index.html

Re: How to send a text file from a client running java sdk to thingworx platform?

Hi dibya ranjan mishra​,

Have you looked at the FileTransferExample which is packaged with Java Edge SDK? It should help in your issue.

Re: How to send a text file from a client running java sdk to thingworx platform?

hello ankit,

     I have gone through the FileTransferExmaple.java and FileTransferExampleHelper.java

     I have a doubt regarding virtual directories. I mean can you explain me the following few lines

this was in the sample code:

     // Add two virtual directories that will act as the root directories

  // in this application's virtual file system.

  // The first field is the name of the directory

  // The second field is the path

  myThing.addVirtualDirectory("in",  "E:/");

  myThing.addVirtualDirectory("out", "E:/");

Re: How to send a text file from a client running java sdk to thingworx platform?

Hi...

in this example, the virtual directory defines a repository (named "in" or "out") and maps it to E:/ on your disk (absolute path in  the file system)

The description is a bit better in the .NET SDK section of the Help Center though...

You can then use the repository alias later on to directly execute create / read / write actions in the mapped folder.

Cheers,

Michael