Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Target URL of resource in KM API

Hi,

I am working on KM API in EP 7.3, and i want to get the target URL of the resource fetched. I tried to use the resource.getTargetURL(), but it returns null.

Please suggest the solution.

Message was edited by: Ankur Goyal

Former Member
Former Member replied

Hi,

I have got my answer through below code:

IURLGeneratorService ug =(IURLGeneratorService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);

IHierarchicalUri uri = ug.getAbsoluteUri(PathKey.CONTENT_ACCESS_PATH);

                    IHierarchicalUri uriRef = uri.appendPath(resource.getRID().toExternalForm());

                    uriString = uriRef.toExternalForm();

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question