This discussion is archived
4 Replies Latest reply: Feb 3, 2013 11:26 PM by 934402 RSS

using ZipRenditionManagement

934402 Newbie
Currently Being Moderated
Hi everyone,
I created a project that add document to UCM server using RIDC.
I am using CHECKIN_UNIVERSAL to checkin document to server.
But when i need to add attachments using RIDC, I can't find any API to do that.
I searched and somebody said that ZipRenditionManagement component can help, but i can't search anymore infomation.

Can anybody give me example?

thx
  • 1. Re: using ZipRenditionManagement
    jiri.machotka Guru
    Currently Being Moderated
    I haven't got an example, but I can tell you how to create one of your own: you can turn on server-wide tracing for requestaudit, perform you use case in web GUI, and then check what services were called. The link how to do that is http://docs.oracle.com/cd/E23943_01/doc.1111/e10792/c03_processes.htm#CSMSP536

    Sometimes this method does not show all parameters. Therefore, it might be advisable also to take a look at the component in Component Wizard. With standard components you will need one more trick (OOTB they cannot be opened): create your own custom component, which is a copy of ZipRenditionManagement.
  • 2. Re: using ZipRenditionManagement
    934402 Newbie
    Currently Being Moderated
    I tried to read tracing output, but it not enought parameter to run services.
    This line from tracing output:

    EDIT_RENDITIONS [dID=xxx][dDocName=xxx][dDocTitle=xxx][dUser=xxx][dSecurityGroup=xxx][dDocAccount=xxx][xCollectionID=763566163607000215] 0.02619200013577938(secs)
    requestaudit/6     02.04 08:59:47.871     IdcServer-145789     
    try {
    IdcClientManager manager = new IdcClientManager();
    IdcClient idcClient = manager.createClient(serverUrl);
    idcClient.getConfig().setSocketTimeout(600000); // 600 seconds
    idcClient.getConfig().setConnectionSize(20); // 20 connections
    DataBinder binder = idcClient.createBinder();
    binder.putLocal("IdcService", "EDIT_RENDITIONS");
    binder.putLocal("dID", "xxx");
    binder.putLocal("dDocNae", "xxx");
    binder.putLocal("xCollectionID", "xxx");
    binder.addFile("primaryFile", new TransferFile(new File("xxx")));
    ServiceResponse response=idcClient.sendRequest(new IdcContext(userName, password), binder);
    System.out.println(response.getResponseAsString());
    } catch (Exception e) {
    e.printStackTrace();
    }
    Server throw exception:
    *ScriptStack EDIT_RENDITIONS
    services/3     02.04 11:35:54.822     IdcServer-149396     3:editRenditions,dID=64568,dDocName=APPSSCGOVVN162064273
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.buildServiceException(Service.java:2326)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.createServiceException(Service.java:2315)
    services/3     02.04 11:35:54.822     IdcServer-149396     at ziprenditions.ZipRenditionsHandler.editRenditions(ZipRenditionsHandler.java:373)
    services/3     02.04 11:35:54.822     IdcServer-149396     at sun.reflect.GeneratedMethodAccessor8361.invoke(Unknown Source)
    services/3     02.04 11:35:54.822     IdcServer-149396     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    services/3     02.04 11:35:54.822     IdcServer-149396     at java.lang.reflect.Method.invoke(Method.java:597)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.doCodeEx(Service.java:603)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.doCode(Service.java:575)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.doAction(Service.java:547)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.doActions(Service.java:542)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.executeActions(Service.java:528)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.Service.doRequest(Service.java:1956)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.idcwls.IdcServletRequestUtils.doRequest(IdcServletRequestUtils.java:1354)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.idcwls.IdcServletRequestUtils.processFilterEvent(IdcServletRequestUtils.java:1731)
    services/3     02.04 11:35:54.822     IdcServer-149396     at intradoc.idcwls.IdcIntegrateWrapper.processFilterEvent(IdcIntegrateWrapper.java:222)
    services/3     02.04 11:35:54.822     IdcServer-149396     at sun.reflect.GeneratedMethodAccessor311.invoke(Unknown Source)
  • 3. Re: using ZipRenditionManagement
    Srinath Menon Guru
    Currently Being Moderated
    Hi ,


    Try the following code snippet and see if this works :

    dataBinder.putLocal("IdcService", "EDIT_RENDITIONS");
    dataBinder.putLocal("dID", "<dID of the content>");
    dataBinder.putLocal("renditionKeys", "addRendition0");
    dataBinder.putLocal("addRendition0.name", "FileAttach");
    dataBinder.putLocal("addRendition0.action", "edit");
    dataBinder.putLocal("addRendition0.file:path", "D:\ridc\test.txt");
    dataBinder.addFile("addRendition0.file", new File("test.txt"));

    addRendition0 is the first attachment that can be added , like wise you can use addRendition1, addRendition2 , addRendition3 etc to add more number of attachments to the same content .

    Hope this helps .

    Thanks,
    Srinath

    Edited by: Srinath Menon on Feb 4, 2013 12:15 PM
  • 4. Re: using ZipRenditionManagement
    934402 Newbie
    Currently Being Moderated
    Thanks for your help, this is correct.

Legend

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