Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello everyone,
I am trying to update properties of a thing which is binded to a virtual thing in my Java environment. During the updateSubscribedProperties() call I get the following Error:
ERROR c.t.c.client.things.VirtualThing - Unable To Update Subscribed Properties For propName : Thingworx message size too large: 55282
Note: I am trying to set an ImagePrimitive here. The ImagePrimitive is created with a byte[] array of size 27k which is 27kilobytes in total.
I already checked the FileTransferSubsystem and the maxBlocksize is set to 128k so I don't see a problem there. Any Ideas how to resolve this? Should I use a different aproach for setting image properties maybe?
Best Regards,
Dominik
Solved! Go to Solution.
Hi Dominik,
A different approach would be to transfer the image from a remote repository on the device in a ThingWorx repository using the Copy service from FileTransferSubsystem, then use service LoadImage from the file repository to get the image, then assign it to a property on the thing.
You would need to extend FileTransferVirtualThing instead of VirtualThing in order to use file transfer. The Java method for adding a remote repository is addVirtualDirectory("AssetRepo", "E:/AssetRepo").
Best regards,
Cristina
Hi Dominik,
A different approach would be to transfer the image from a remote repository on the device in a ThingWorx repository using the Copy service from FileTransferSubsystem, then use service LoadImage from the file repository to get the image, then assign it to a property on the thing.
You would need to extend FileTransferVirtualThing instead of VirtualThing in order to use file transfer. The Java method for adding a remote repository is addVirtualDirectory("AssetRepo", "E:/AssetRepo").
Best regards,
Cristina
Hello Christina,
thank you very much for your reply. I will try this out and let you know whether it worked.
Best Regards,
Dominik
Hello again Christina,
will this also work for hosted servers? I am wondering because I can't see/access any repositories from the foundation server.
Regards,
Dominik
Hi Dominik,
The transfer from the device repository to the hosted ThingWorx repository is achieved via WebSockets protocol. There are ThingWorx APIs available to interact with the hosted ThingWorx repository content such as GetDirectoryStructure, GetFileListingWithLinks, SaveText, etc.
Best regards,
Cristina
Hello Christina,
thank you again. Maybe you could also check out this thread I opened. Since I will update the images frequently (its a live stream actually) I feel this approach might be too exhaustive, so I would like to do these updates via Rest calls.
Regards,
Dominik