Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hey all,
I want to know my thingworx server url to put into temperature-thing-template java code.
this is my url when opening composer
http://52.199.145.73/Thingworx/Composer/index.html
Thanks
Aarushi
Hello,
What is it that you would like to know? You want to know the hostname of your TWX Server or the ip? From what you said so far, it looks like your TWX Server ip is: 52.199.145.73. Remember, when you are executing the .jar file you have to setup the correct parameters as well as set WS (web socket). when you execute a .jar file from a computer or device, you have to pus WS instead of http and WSS instead of https.
Thank you,
Adrian
Hi:
Not sure if any of these suite your need, of course you might need to create a service to produce the output you need.
// result: STRING
var IPAddress = Resources["CurrentSessionInfo"].GetCurrentIPAddress(); // if you run from the server it will return your server ip.
Or
// getHostIPAddress(name:STRING):STRING
var address = getHostIPAddress("myTWServerName"); //Replace myTWServerName with your Server name
Or
// getAdapterIPAddress(name:STRING):STRING
var address = getAdapterIPAddress("myTWAdapterName"); // Replace myTWAdapterName with your Adapter name.
Or
Another approach might be to create a persistent property that holds the server name and use it in a service like:
var url_str = "http://"+me.TW_ServerName+"/Thingworx"; // TW_ServerName is the name of the property you created.
result = url_str;
-Jose
if TW_ServerName is the name of the property, the question still remains with how to fill this property value by getting the current url?
Regards,
Abhishek Kumar