Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi,
The Java edge SDK raise 302 error code when connecting to ThingWorx server, the IP address and appKey is correct . The server has a customized Authenticator enabled , but sending post request via Postman to the server works. Why the java sdk can not connect to the server ?
ThingWorx version: 9.1.0
edge SDK: 7.0
JDK : 11
Regards,
Sean
@seanccc : Instead of ip can you try with the domain name of your server in the uri. Ex:"ws://pp-20050704237k.portal.ptc.io:8080/Thingworx/WS"? Also, is SSL enabled for your thingworx server? If yes, in that case connection uri in sdk should use wss instead of ws.
Hi @seanccc.
Were you able to make any progress on your issue? Did you test using the domain name? The IP address seen in the pic you provided indicates you are trying to connect internally, but I assume that is not the case. Please make sure to use the public IP address if communicating outside your network.
Also, is it possible that you have SSL enabled in your java SDK? From the url in the log snippet, we can see that SSL is not enabled on the ThingWorx side. If you have it enabled on the sending side, that could be the cause of the issue.
Regards.
--Sharon