Skip to main content
1-Visitor
May 2, 2023
Question

How to create Generic URL to utilize multiple times

  • May 2, 2023
  • 1 reply
  • 1739 views

I am using Windchill PDMLink Release 12.0 and Datecode with CPS 12.0.0.2

We are creating Generic URL through code to download some content. But, we can't utilise that URL more than once. So, We need to know how I can re-utilise the same URL without executing functionality. Or any other way to download by asking credentials ?

1 reply

avillanueva
23-Emerald I
23-Emerald I
May 2, 2023

I am not understanding the requirement for "can't utilize that URL more than once". Are you looking to create a static URL? Content download links contain the object IDs which change with each iteration so its hard to say get the latest of the content item. Can you rephrase the question or possible provide screenshots/examples?

1-Visitor
May 2, 2023

Basically, I used below piece of code to create the URL for EPM Document Object JT file download.

 

ApplicationData app_data = (ApplicationData) app_object;
URL contentURL = ContentHelper.getViewContentURL(app_data, representation, false);

String path = contentURL.getPath();

 

But, once URL is created, I can use only once to download the JT file. Post that If I use the same URL, its throwing error in UI stating that cant use anymore please execute the functionality once again. So, my question is wanted to re-use the same URL multiple times.

avillanueva
23-Emerald I
23-Emerald I
May 2, 2023

Can you post that error message you are getting? That is strange.  I searched and cannot find anything in knowledge base or have seen that. Perhaps something to do with session or login.