Author Topic: ICN link for CMOD document.  (Read 100 times)

psandeep1389

  • Newbie
  • *
  • Posts: 3
    • View Profile
ICN link for CMOD document.
« on: January 29, 2020, 08:22:23 PM »
how do we form an ICN link for a document stored in CMOD repository.

Below is the ICN link returned for a document in CMOD.

http://localhost:9080/navigator/bookmark.jsp?desktop=OnDemand&repositoryId=CMOnDemand&repositoryType=od&docid=O2ht%2BxqHR5K6hQ2jdUX6cNfDsZFQWNvezV7Mazf2yHgJHs2BMYpUPRzqbujSrDBXdKVxUp3M9M%2FEUtjXAL1q60NHO2FMl1BPwEYByUyBIEovdc8MFI%2FEgW8czERcFNVecfOLVBrbxpy0X1CuExaqJ%2Bu%2BSk6MvqrmR8CRLcPMHgJaDU57q2mGHBkOfvYp%2Fi%2F5E1&mimeType=application%2Fxml&template_name=AP_Folder&version=current


Can you please suggest the method to retrieve the docid from ODWEK.

as  docid returned from these two methods ODHit.getDocId() and ODHit.getOpenDocId() failed to open a document in viewer.

Also  the urlencoder to be used for this.

http://localhost:9080/navigator/bookmark.jsp?desktop=OnDemand&repositoryId=CMOnDemand&repositoryType=od& //Constant for each Environment
            + "docid="+ docID //Odwek API call
            + "&mimeType="+odHit.getMimeType() // //Odwek API call
            + "&template_name=AP_Folder" //FodlerName
            + "&version=current";//Constant for CMOD


rjrussel

  • Jr. Member
  • **
  • Posts: 43
    • View Profile
Re: ICN link for CMOD document.
« Reply #1 on: February 03, 2020, 07:30:33 AM »
Both ODHit.getDocId() and ODHit.getOpenDocId() return back the native CMOD docID (one tied to a user id and one not). In their native format, they are not suitable for transmission via http/https. You must first URLEncode them before you can use them.

There are no other methods to get docID's.

Thanks,
RR

psandeep1389

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: ICN link for CMOD document.
« Reply #2 on: February 09, 2020, 11:14:34 PM »
The docid method output is encoded and i have hit the URl again but the document doesn't load through ICN.

[2/5/20 11:48:38:076 EST] 0000007c SystemOut     O CIWEB Entry: [ADMIN(unknown) @ 0:0:0:0:0:0:0:1] [REQUEST 51] com.ibm.ecm.mediator.od.ODSearchResultsMediator.buildTableRows()
[2/5/20 11:48:38:076 EST] 0000007c SystemOut     O CIWEB Exit : [ADMIN(unknown) @ 0:0:0:0:0:0:0:1] [REQUEST 51] com.ibm.ecm.mediator.od.ODSearchResultsMediator.buildTableRows()
[2/5/20 11:48:38:077 EST] 0000007c SystemOut     O CIWEB Entry: [ADMIN(unknown) @ 0:0:0:0:0:0:0:1] [REQUEST 51] com.ibm.ecm.mediator.od.ODSearchResultsMediator.buildTableColums()
[2/5/20 11:48:38:083 EST] 0000007c SystemOut     O CIWEB Error: [ADMIN(unknown) @ 0:0:0:0:0:0:0:1] [REQUEST 51] com.ibm.ecm.mediator.od.ODSearchResultsMediator.toJSONObject()
java.lang.NullPointerException
              at com.ibm.ecm.mediator.od.ODSearchResultsMediator$OdSortRules.<init>(ODSearchResultsMediator.java:553)
              at com.ibm.ecm.mediator.od.ODSearchResultsMediator.buildTableColumns(ODSearchResultsMediator.java:458)
              at com.ibm.ecm.mediator.ResultSetMediator.toJSONObject(ResultSetMediator.java:110)
              at com.ibm.ecm.mediator.od.ODSearchResultsMediator.toJSONObject(ODSearchResultsMediator.java:277)
              at com.ibm.ecm.mediator.BaseMediator.toJSONString(BaseMediator.java:424)
              at com.ibm.ecm.mediator.BaseMediator.writeJSON(BaseMediator.java:547)
              at com.ibm.ecm.mediator.BaseMediator.writeJSON(BaseMediator.java:532)
              at com.ibm.ecm.mediator.BaseMediator.writeJSONResponse(BaseMediator.java:661)
              at com.ibm.ecm.struts.actions.BaseAction.writeJSONMediator(BaseAction.java:484)
              at com.ibm.ecm.struts.actions.od.ODRetrieveItemsAction.executeAction(ODRetrieveItemsAction.java:189)
              at com.ibm.ecm.struts.actions.od.ODBaseAction.executeBaseAction(ODBaseAction.java:138)