- Required to take a picture using the Camera Widget, then save the photo in a Repository in Thingworx
- To save the picture to dataBase use the SaveImage Service from the Repository Thing
- Can not save image captured via Camera Widget in Vuforia Studio to Thingworx Repository
- After binding Image Data Property of Camera Widget with content Property of SaveImage Service of File Repository Thing from ThingWorx, the base64-encoded string (text) fails to transfer with http 406 response
- ThingWorx itself executes correctly on SaveImage Service even with base64-encoded string, the JSON sample is as below:
{
"path":"/test/123.jpg",
"content":<base64-encoded string>
}
- Vuforia Experience Service log reported http 406 response error:
:ffff:<IP address> - - [date] "POST /Thingworx/Things/<thing name>/Services/<service name> HTTP/1.1" 406 - "http://localhost:3000/resource/<experience name>/dist/index-desktop.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36" 20008 ms <ES server>:<ES port> 90943 [date] - ms - ms - ms - ms
- Postman fails with http 406 status cod as well when using below URL with correct JSON body:
http://<ES host>:<ES port>/Thingworx/Things/<thing name>/Services/<service name>
- ThingWorx ApplicationLog.log contains message below:
YYYY-MM-DD HH:MM:SS.MS+0900 [L: ERROR] [O: c.t.w.Things] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-80-exec-5] Unable To Parse JSON Request
YYYY-MM-DD HH:MM:SS.MS+0900 [L: ERROR] [O: c.t.w.BaseService] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-80-exec-5] Invalid request: Unable To Parse JSON Request
YYYY-MM-DD HH:MM:SS.MS+0900 [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: ???] [S: ] [P: ] [T: http-nio-80-exec-5] Connection should be closed but message received anyway. Attempting to force close. Message: V1MessageHeader [messageType=3, requestId=92521, endpointId=0, sessionId=51083549, flags=0]
YYYY-MM-DD HH:MM:SS.MS+0900 [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: ???] [S: ] [P: ] [T: http-nio-80-exec-5] Server WebSocket closed unexpectedly and has already been unregistered from Server Endpoint [ws session id: 6] null
- We are able to send and receive data to/from ThingWorx but it fails when we try to send a picture to ThingWorx from Vuforia View