Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I'm looking to create a custom REST service that performs the same function as my current SOAP service in Windchill 12, which retrieves the Windchill version. Can anyone provide guidance on how to achieve this.
Here are some details :
I attempted to create one REST service and tested it using Postman, but I encountered an error. The error message stated :
"Failed to get the search results using Windchill search service: Info resource not found for wt.util.version.WindchillVersion."
This indicates that the REST service was unable to locate the necessary Windchill version resource, causing the operation to fail.
Hi @BRAHIM
My first thought is if your JS custom function contains correct import with the WindchillVersion class
var WindchillVersion = Java.type('wt.util.version.WindchillVersion');
PetrH
Hi @HelesicPetr
Thank you for your response. I have already ensured that my JS custom function imports the correct WindchillVersion class. Below is my js code :
I doubt this file does not contains the correct type !!
Hi @BRAHIM
Check the methodserver log. There could be useful information where the error is thrown, on which row.
Also check if the class and method really exists in your Windchill installation.
There could be a change sure the case can be anything
PetrH.
There is an OOTB endpoint that outputs Windchill Version:
<hostname>Windchill/servlet/odata/v4/PTC/GetWindchillVersion()
+ @BRAHIM you are using JS Hooks in OData which has a different purpose, I didn't understand what you want to achieve!
+ There is an info engine domain in OData from which you can invoke tasks, please don't use it unless necessarily: /Windchill/servlet/odata/v1/IE