This discussion is archived
7 Replies Latest reply: May 14, 2012 12:01 PM by Sachin Saxena RSS

Skipping ucm login form when showing content on webcenter application.

879338 Newbie
Currently Being Moderated
Hi,
I have a webcenter portal application., It has a page, which shows pdf from content server in af:inlineFrame. Its appearing fine but system first shows login page of ucm. I want to skip that page and user details of webcenter current session should be used to login to ucm.

How to achieve it?

Thanks
Sanjeev.
  • 1. Re: Skipping ucm login form when showing content on webcenter application.
    Yannick Ongena Employee ACE
    Currently Being Moderated
    I think there is something conceptualy wrong with your approach. Although it can be solved without changing the concept I want to point you out that using an af:inlineFrame is not the way to go to show content from your content server.

    In webCenter there is a component called the Content Presenter which is designed to show content from UCM. For this you need to create a connection in JDeveloper to your UCM server. The advantage of this is that if will take your credentials of the users and pass it on to that connection which means that you do not have to log in to UCM anymore and all the security constraints from UCM still exists in WebCenter portal as well.

    The CP can display content in a list or display the actual content like your PDF or an HTML file.
    You can read this part of my tutorial: http://www.yonaweb.be/webcenter_11g_ps3_tutorial_introduction_content_integration
    I have lots of articles about the CP and how to use them as well on my blog that might help you.
  • 2. Re: Skipping ucm login form when showing content on webcenter application.
    879338 Newbie
    Currently Being Moderated
    Initially I thought of content presenter only but then I found that default template used to show a pdf is very different.

    Default template shows a link of pdf and then some details like created-by, last-modified-by etc. But my requirement is to embed actual content on my webpage. Can we show content of pdf using content presenter? If yes how?

    Thanks
    Sanjeev.
  • 3. Re: Skipping ucm login form when showing content on webcenter application.
    Yannick Ongena Employee ACE
    Currently Being Moderated
    In order to do this you need to inbound refinery to make a proper rendition of the PDF. UCM can handle this and the CP can handle this as well but you need to configure some things in UCM to make a rendition from the PDF.
    The IBR can also handle renditions from powerpoint, excell, word and so on.
  • 4. Re: Skipping ucm login form when showing content on webcenter application.
    879338 Newbie
    Currently Being Moderated
    Hi Yannic, thanks for the reply. I will try to configure IBR but I have few questions now.

    1. Do customer needs to buy separate license for IBR or it comes with UCM?
    2. I think IBR will convert my pdf to html and its content will start appearing as normal html. But my requirement is to embed the pdf in web page. That way user will have pdf options like search, save, print etc.

    Thanks
    Sanjeev.
  • 5. Re: Skipping ucm login form when showing content on webcenter application.
    Sachin Saxena Explorer
    Currently Being Moderated
    Hi,

    You can try one more thing. The default url you are using to open pdf I guess is in the format - <server name>/cs/idcplg/ . You can try the url like this :

    <server name: port>/webcenter/content/conn/<Content Repository Name>/path/<ucm folder path of the file>/<Original name of the file>.

    Now, the question is how to get the path of the document because you will just have the content id of the document. I have used some of the RIDC apis to get the path of the document:

    /** Get the file path for the given content id
    */
    private String getFilePath(String contentId){
    String path = "";
    try{
    IdcClientManager manager = new IdcClientManager();
    IdcClient idcClient = manager.createClient("<server name>");
    IdcContext userContext = new IdcContext(<username>, <password>);

    //Call IDC Sevice GET_SEARCH_RESULTS to get the Folder Id
    DataBinder binder = idcClient.createBinder();
    binder.putLocal("IdcService", "GET_SEARCH_RESULTS");
    binder.putLocal("QueryText", "dDocName <matches> `" + contentId + "`");
    binder.putLocal("ResultCount", "1");
    ServiceResponse response = idcClient.sendRequest(userContext, binder);
    binder = response.getResponseAsBinder();
    DataResultSet resultSet = binder.getResultSet("SearchResults");
    String folderId = "";
    String docOriginalName = "";
    for (DataObject dataObject : resultSet.getRows()) {
    folderId = dataObject.get("xCollectionID").toString();
    docOriginalName = dataObject.get("dOriginalName").toString();
    }


    //Call IDC Sevice COLLECTION_DISPLAY to get the PATH
    binder.putLocal("IdcService", "COLLECTION_DISPLAY");
    binder.putLocal("dCollectionID", folderId);
    binder.putLocal("hasCollectionID", "true");
    ServiceResponse response1 = idcClient.sendRequest(userContext, binder);
    binder = response1.getResponseAsBinder();
    resultSet = binder.getResultSet("PATH");
    for (DataObject dataObject : resultSet.getRows()) {
    path = path.concat("/" + dataObject.get("dCollectionName").toString());
    }

    path = path.concat("/" + docOriginalName);

    path = "/webcenter/content/conn/<conection repository name>" + path;
    }
    catch(Exception ioe){
    System.out.println("Exception");
    }
    return path;
    }
  • 6. Re: Skipping ucm login form when showing content on webcenter application.
    879338 Newbie
    Currently Being Moderated
    Hi Yannick,
    I have enabled the IBR and able to convert pdf to web viewable file. On content information page I can see weblocation information populated with pdf file.

    I tried to render show it using content presenter but it shows a link and details as always, not actual content. How would I tell content presenter to show file from weblayout?

    @Sachin, Thanks for your reply. I will try your approach but before that I want to test with standard flows provided by Oracle.


    Thanks
    Sanjeev.
  • 7. Re: Skipping ucm login form when showing content on webcenter application.
    Sachin Saxena Explorer
    Currently Being Moderated
    You can try my approach after testing standard flows. One thing I want to mention is, I have used an additional method to get the path because I just have the content id.
    If in your case your pdf file is a node in the content presenter then you can get the path using el:
    #{node.path}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points