Could you please open a separate thread on this in the ThingWorx Developer board? This would help bringing exposure for other users and not turn the "how-to-guide" into a troubleshooting thread.
Content Move Notice (Dec. 2018)
ThingWorx Code Examples boards are now merged into IoT Tech Tips under the Code Examples label.
The Service Apps board is now merged into the Manufacturing Apps board.