Skip to main content
Jan 3, 2024 8:50 AM UTC
Solved

How can I invoke/run the custom Windchill class from a .bat file on remote machine?

How can I invoke/run the custom Windchill class(deployed in Windchill home directory) from a batch file(.bat) in another (remote) machine?

Jan 3, 2024 9:39 AM UTC

Hi @NP_10570407 

Google can help you to find how to call http in cmd

https://medium.com/@dwyer.donovan/sending-http-requests-from-your-command-line-5ef6eecffb0a

 

Example of a class that can be run from HTTP

package cz.HELT;

public class Test1 implements RemoteAccess
{
public static void ProjectsTest(HTTPRequest req, HTTPResponse resp) throws WTException
{
// run your code
}
)

http address to call your class

http://server/Windchill/servlet/WindchillAuthGW/cz.HELT.Test1/ProjectsTest?IBA=123456&VALUE=0000

 

PetrH

6 replies

Jan 3, 2024 9:02 AM UTC

Hi @NP_10570407 

Use http request to run your code from another machine. 

I don't think you can do it without calling http request. 

You can run the java class from local cmd with correct configuration but outside that machine it seams like you would like to hack the windchill >D

PetrH

Jan 3, 2024 9:27 AM UTC

Hi @HelesicPetr 

If possible, could you please provide me with a sample code.

Thanks in advance.

Jan 3, 2024 9:39 AM UTC

Hi @NP_10570407 

Google can help you to find how to call http in cmd

https://medium.com/@dwyer.donovan/sending-http-requests-from-your-command-line-5ef6eecffb0a

 

Example of a class that can be run from HTTP

package cz.HELT;

public class Test1 implements RemoteAccess
{
public static void ProjectsTest(HTTPRequest req, HTTPResponse resp) throws WTException
{
// run your code
}
)

http address to call your class

http://server/Windchill/servlet/WindchillAuthGW/cz.HELT.Test1/ProjectsTest?IBA=123456&VALUE=0000

 

PetrH