Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi,
I design desktop application using java. Need to download files from server using onclick button function
I need java API for checkout and download action in windchill.
Solved! Go to Solution.
Hi @MS_10194939
I am not sure if the API can help you because you need to start communication with Windchill over HTTP Server with credentials.
I usually write own java function in the Windchill that is called by HTTP Request and a result is returned by HTTP Response. It can be file 😄
// for checkout object you can use follwoing API
Folder folder = WorkInProgressHelper.service.getCheckoutFolder();
CheckoutLink checkLink = WorkInProgressHelper.service.checkout(workableObject, folder, "checkout By Code");
Workable objectCheckOutCopy = checkLink.getWorkingCopy();
Or another option exists, use the Windchill REST API.
PetrH
Hi @MS_10194939
I am not sure if the API can help you because you need to start communication with Windchill over HTTP Server with credentials.
I usually write own java function in the Windchill that is called by HTTP Request and a result is returned by HTTP Response. It can be file 😄
// for checkout object you can use follwoing API
Folder folder = WorkInProgressHelper.service.getCheckoutFolder();
CheckoutLink checkLink = WorkInProgressHelper.service.checkout(workableObject, folder, "checkout By Code");
Workable objectCheckOutCopy = checkLink.getWorkingCopy();
Or another option exists, use the Windchill REST API.
PetrH
Thank you for the help. Can you please tell me another option using windchill REST API. I am at the beginning level in windchill .
Hello @MS_10194939
You can start with help documentation.
Also each Windchill installation has documentation for OData REST API
https://serverAddress.company.com/Windchill/app/#ptc1/apiDocs/apiDocs
I have experience just with OData REST APIs because I use it in the ThingWorx .
I hope this can help.
PetrH
Thank you