<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create a custom REST service based on SOAP service in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963508#M8441</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/703052"&gt;@BRAHIM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My first thought is if your JS custom function contains correct import with the WindchillVersion class&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;var WindchillVersion = Java.type('wt.util.version.WindchillVersion');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;PetrH&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2024 07:59:25 GMT</pubDate>
    <dc:creator>HelesicPetr</dc:creator>
    <dc:date>2024-07-26T07:59:25Z</dc:date>
    <item>
      <title>Create a custom REST service based on SOAP service</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963429#M8438</link>
      <description>&lt;P&gt;I'm looking to &lt;STRONG&gt;create a custom REST service that performs the same function as my current SOAP service in Windchill 12&lt;/STRONG&gt;, which retrieves the Windchill version. Can anyone provide guidance on how to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Here are some details :&lt;BR /&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL class="lia-list-style-type-disc"&gt;&lt;LI&gt;This link below shows the steps to create a custom REST service in Windchill.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://support.ptc.com/help/windchill_rest_services/r2.5/en/#page/windchill_rest_services/WCCG_RESTAPIsCustomizingExamplesCreateDomain.html#" target="_blank"&gt;https://support.ptc.com/help/windchill_rest_services/r2.5/en/#page/windchill_rest_services/WCCG_RESTAPIsCustomizingExamplesCreateDomain.html#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL class="lia-list-style-type-disc"&gt;&lt;LI&gt;My code is a JSP-based SOAP service that retrieves the version of Windchill installed. It imports necessary Java classes, creates an output group, and attempts to fetch the Windchill version using &lt;STRONG&gt;&lt;EM&gt;WindchillVersion.getInstalledAssemblyReleaseIdFor("wnc")&lt;/EM&gt;&lt;/STRONG&gt;. If successful, it adds the version string to an element and then to the output group. The final part uses an InfoEngine webject to return this group as the SOAP response. This service ensures that the Windchill version is retrieved and returned in a structured format.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I attempted to create one REST service and tested it using Postman, but I encountered an error. The error message stated :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;"Failed to get the search results using Windchill search service: Info resource not found for wt.util.version.WindchillVersion."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BRAHIM_0-1721922023376.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108291i9094C5CCF75976D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BRAHIM_0-1721922023376.png" alt="BRAHIM_0-1721922023376.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This indicates that the REST service was unable to locate the necessary Windchill version resource, causing the operation to fail.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 15:45:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963429#M8438</guid>
      <dc:creator>BRAHIM</dc:creator>
      <dc:date>2024-07-25T15:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom REST service based on SOAP service</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963508#M8441</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/703052"&gt;@BRAHIM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My first thought is if your JS custom function contains correct import with the WindchillVersion class&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;var WindchillVersion = Java.type('wt.util.version.WindchillVersion');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;PetrH&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 07:59:25 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963508#M8441</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2024-07-26T07:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom REST service based on SOAP service</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963530#M8443</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/241117"&gt;@HelesicPetr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Thank you for your response. I have already ensured that my JS custom function imports the correct WindchillVersion class. Below is my js code :&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BRAHIM_0-1721982301091.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108320i75B340A1117B823B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BRAHIM_0-1721982301091.png" alt="BRAHIM_0-1721982301091.png" /&gt;&lt;/span&gt;&lt;P&gt;I doubt this file does not contains the correct type !!&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BRAHIM_1-1721982468395.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108321i6A578051D1962DF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BRAHIM_1-1721982468395.png" alt="BRAHIM_1-1721982468395.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2024 08:28:32 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963530#M8443</guid>
      <dc:creator>BRAHIM</dc:creator>
      <dc:date>2024-07-26T08:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom REST service based on SOAP service</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963532#M8444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/703052"&gt;@BRAHIM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the methodserver log. There could be useful information where the error is thrown, on which row.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also check if the class and method really exists in your Windchill installation.&lt;/P&gt;
&lt;P&gt;There could be a change sure the case can be anything&lt;/P&gt;
&lt;P&gt;PetrH.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 08:37:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963532#M8444</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2024-07-26T08:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom REST service based on SOAP service</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963653#M8447</link>
      <description>&lt;P&gt;There is an OOTB endpoint that outputs Windchill Version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;hostname&amp;gt;Windchill/servlet/odata/v4/PTC/GetWindchillVersion()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108359i7078473CB2E568B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 20:04:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963653#M8447</guid>
      <dc:creator>tarik_p</dc:creator>
      <dc:date>2024-07-26T20:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom REST service based on SOAP service</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963657#M8448</link>
      <description>&lt;P&gt;+&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/703052"&gt;@BRAHIM&lt;/a&gt;&amp;nbsp;you are using JS Hooks in OData which has a different purpose, I didn't understand what you want to achieve!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;+ There is an info engine domain in OData from which you can invoke tasks, please don't use it unless necessarily: &lt;STRONG&gt;&lt;EM&gt;/Windchill/servlet/odata/v1/IE&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 20:03:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Create-a-custom-REST-service-based-on-SOAP-service/m-p/963657#M8448</guid>
      <dc:creator>tarik_p</dc:creator>
      <dc:date>2024-07-26T20:03:41Z</dc:date>
    </item>
  </channel>
</rss>

