CHECKIN_NEW service

Hi,
I have a problem with checkin_new service.
Now, i have a service that only prupose is to generate a file.
The file is storage in temp directory of CM file system and the next step would be to checkIn this file.
I'm trying to call the CheckIn Service from my code.
can i call one service within other service??
can you help me please or suggest me the other way to do that??
Thanks,
Nuno

Hey Nuno,
You can certainly call another service from within your java code. The best place to look for an example is in Brian Bex Huff's book (Definitive Guide to Content Server Development) on page 234. In the example he is executing a service from a filter but the concept is the same, the only difference is a couple of references.
Hope that helps,
Andy Weaver - Software Consultant
Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=amw >
Check out our Oracle Consulting Services Section.

Similar Messages

  • Changing response template for CHECKIN_NEW service

    Hi!
    We use the CHECKIN_NEW service via URL.
    When the file is checked in, though, instead of having the checkin_confirm.htm response page (from CHECKIN_CONFIRM_FORM invoked by CHECKIN_NEW), I would like to have a response page of my own design.
    Can I, by overriding CHECKIN_NEW in a custom component, only add a new template as a ConfirmPage and have this displayed instead or how do I do this the best way?

    I am going from memory from years ago when someone asked me this same question, but I think that the service that the service CHECKIN_CONFIRM_FORM is the service you want and actually all you would need to override would be the actual form called by the service (or the includes that are called on that form) to change or personalize the check in confirmation form.
    On pre 11g servers add &ScriptDebugTrace=1 to the url of that page. This will give you the hierarchy of includes called from that form (which was called by the CHECKIN_CONFIRM_FORM service and appears as one of the parameters to the service if you go look at std_services.htm or the services reference guide.
    On 11g &ScriptDebugTrace=1 is turned off by default. Search the online 11g docs for that variable to find out how to turn it back on. You could turn it off on pre 11g servers but it was on by default as opposed to off by default in 11g.
    So the service calls the template (which you can find the name of in the service definition or the services reference guide or by looking in the standard template file templates.hda) and the template has standard include calls inside of it which call other includes. You can look at those with &ScriptDebugTrace=1 on the page URL (but remember not to be in Trays layout because Framesets mess up the URL)
    Some of this same stuff is in a note on My Oracle Support (MOS)
         How Is The Content Server Customized with IDOC Script and Custom Components? (Doc ID 983321.1)
    Support can not help with custom code but they made a simple note to offer some general guidelines.
    Edited by: KJR on Oct 28, 2010 10:53 AM

  • Use the CHECKIN_NEW service in the browser url

    Hi,
    I use UCM 10gR3.
    I am wondering if it is possible to use the CHECKIN_NEW service by just entering a url into the http path. I was checking the postCheckInStandard() function that is being called when the user is clicking the checkin button in the ucm administration webpage. All it does is checking the input values and setting the IdcService to "CHECKIN_NEW" and then submitting the form. So from my understanding I should also be able to use the CHECKIN_NEW service in my browser url which would make a GET request instead of a POST request.
    So what I did was that I entered the following URL in my browser
    http://<serverName>/<instanceName>/idcplg?IdcService=CHECKIN_NEW&dDocType=Picture&dDocTitle=TestCheckin&dDocAuthor=http_checkin&dSecurityGroup=Secure&primaryFile=C:/Work/Chrysanthemum.jpg&IsJava=1Why is this not working? Is this not working because the input type of the primaryFile is 'file' instead of 'text'?
    Greetings
    Bodhy

    You should see some sort of error on either the page or Server Output or Server logs. That would help narrow this down.
    From the Services Guide:
    If you attempt to set the author (dDocAuthor) to someone other than the currently
    logged in user, you must have Admin permission to the security attributes being
    assigned to the document.
    If the content uses entity security, the user must have at least Write permission
    granted by the entities, unless the user has Admin rights to the security group
    being assigned to the document.
    The most likely error is when the content item was not properly defined.
    This service executes the subservice CHECKIN_NEW_SUB. This subservice
    checks in a new content item revision.
    Additional Required Service Parameters
    dDocName: The Content ID for the content item. If Content ID auto generation is enabled, this parameter is not required. If dDocName is defined, it overrides the auto generated Content ID. The Content ID cannot contain spaces or invalid characters ;/ \?:@&=+"#%<>*~|[ ].
    dDocAuthor: The content item author (contributor).
    dDocTitle: The content item title.
    dDocType: The content item Type.
    dSecurityGroup: The security group such as Public or Secure.
    dDocAccount: The account for the content item. Required only if accounts are
    enabled.
    primaryFile: The absolute path to the location of the file as seen from the server. Use the slash as the file separator. A primary file must be specified unless checking in metadata only. If an alternate
    file is specified with the primary file, the content refinery converts the alternate
    file. Otherwise, the primary file is converted.
    Required custom fields: Custom metadata fields that are required must also be
    specified.
    Example
    IdcService=CHECKIN_NEW
    dDocName=test1111
    dDocTitle=test information
    dDocAuthor=john
    dSecurityGroup=public
    primaryFile=c:/test.txt
    doFileCopy=1
    doFileCopy: 1 (true): The file is not deleted from the hard drive after checkin.

  • Checkin file using custom service

    Hi All,
    I am using Oracle UCM 11g.
    I am creating the Service handler for new custom service. As part of this, I am checkin the new file in UCM using CHECKIN_NEW service. But while providing the Primary file information in Binder, it gives the following error:
    Event generated by user 'weblogic' at host 'localhost:16200'. Content item 'Test_File' was not successfully checked in. The content item must have a primary file
    I am entering the below details for file in the custom class:
    String PrimaryFile_File1 = "C:\\Test.doc";
    super.m_binder.putLocal("primaryFile", PrimaryFile_File1);
    I also tried creating FILE object and used the File.toString() to pass it as argument to Binder, but that too did not work.
    What part is missing here in code?
    Thanks in Advance
    Dipesh

    Re: Use the CHECKIN_NEW service in the browser url post might help.
    primaryFile: The absolute path to the location of the file as seen from the server. Use the slash as the file separator. A primary file must be specified unless checking in metadata only.

  • CHECKIN_NEW via HTTP

    Hi,
    I'm trying to push some test documents into our content server and thought I'd be able to use CHECKIN_NEW service via a http call, but I always get a error message saying
    <h4>Content Server Request Failed</h4>
    Content item '1000' was not successfully checked in.
    The content item must have a primary file.
    I'm running my command from the content server host and I currently have the documents I want to push in under
    /data/oracle/new (this directory is owned by ucmuser:users, ucmuser is the account running content server)
    ls -l /data/oracle/new/1000.txt
    -rw-r--r-- 1 ucmuser users 1446 2009-05-21 13:40 /data/oracle/new/1000.txt
    This is the url I'm trying, but have no success with:
    http://localhost/idc/idcplg?IdcService=CHECKIN_NEW&dDocName=1000&dDocType=ADACCT&primaryFile=/data/oracle/new/1000.txt&dDocAuthor=martinst&dDocTitle=1000%20Title&dSecurityGroup=public&doFileCopy=1
    The request is made by sysadmin
    Is this something that should work?
    Thanks
    Martin

    If you want to push file, you must read it content and pass it to the server. Name in URL definitely will not help here. I can suggest to use some kind of http sniffer (I used HTTP Debugger Pro v3.1) - then you will be able to see difference in what is sending when you do standard check-in and when you try to feed your URL... You will be able to see what must be sent for successful checking in. I did it once with java code...

  • Where can I find a document's or folder's GUID for the FLD_MOVE service?

    We are currently migrating to Webcenter Content 11.1.1.6 using FrameworkFolders. We need to integrate with several other systems to check-in and retrieve files and would like to place our content in a folder-based heirarchy. I have been using the Generic Web Service to perform integration functions.
    I am trying to use the Folders Services to get information about folders and place files into specific folders.
    First of all, if I check in a file using the "CHECKIN_NEW" service, what folder does the file go into? I can search for the file, but it doesn't seem to belong to a folder? As far as I can tell, the only way to retrieve the file is to search for it. Shouldn't it go to some folder by default?
    Second, lets say I want to move that file to a folder. The "FLD_MOVE" service seems to be what one would use to place a file into a folder. The parameter (item1) that is used to identify what you want to move can take either a GUID or a path to the file. I can't use a path since the file doesn't seem to have a path. I have tried using the dID and the dDocName as the GUID parameter, but the service always comes back and says my item does not exist.
    I can't find any other kind of unique identifier for my document. I have searched and searched for what the GUID could be and how to find out what it is. GUID seems to be specific to the Contribution Folders and Folders Service, as none of the other services reference GUID.
    What is a GUID and how can I figure out what a document's GUID is?

    Very good advice on turning on the auditing. I found a link to how to do this in another post. It seems the documentation around the services lacks the information necessary to use them, but the audit logs can reveal what parameters need to be used to perform an action.
    Turn on server-wide tracing for request audit http://docs.oracle.com/cd/E23943_01/doc.1111/e10792/c03_processes.htm#CSMSP536 and then create the link from GUI (maybe DIS). You will find your answer in the Server Output.
    By turning on the audit logs and using the browser UI to place a document into a folder, I found this in the audit log (cleaned up for readability):
    IdcService=FLD_CREATE_FILE
    fFileType=owner
    fParentGUID=3BCD5A4050F2D10D9C0A0CF3CC8840C1
    dialogCounter=4
    dDocName=USTST-PFARPIM000808
    constructDidCreateLinkDialog=1
    dID=807
    idcToken=1370802991160%3A01FCE7B4B65CB3E48EDC2A1982C62526
    constructDidCreateLinkDialog=1
    IsJson=1
    Calling the web service using the parameters in bold performed the folder assignment of a document using the document's docName value (which is readily available in the GUI).
    Thanks!

  • How to modify a java method in Folder component

    Hi,
    I need to add some custom java code after a java method in Folder component (I am using UCM 10g, the java method is "buildResultSet" in service "COLLECTION_COPY_LOT").
    I defined service handler as described in Bex's book. My static table is:
    <@table custom_ServiceHandler@>
    <tr>
    <td>serviceName</td><td>handler</td><td>searchOrder</td>
    </tr>
    <tr>
    <td>Service</td><td>myPackage.MyClass</td><td>1</td>
    </tr>
    </table>
    Java code is :
    package myPackage
    public class MyClass extends ServiceHandler {
    public void buildResultSet() trows DataException,ServiceException
    ............. mu custom code
    m_service.doCodeEx("",this);
    If a change java method to addFiles and in static table Service to DocService, when i execute Checkin_new service it executes my custom code. I tried to change to loadorder, but have no success.
    Pls someone to tell me how can i modify this method or any other java method in "COLLECTION_COPY_LOT" service. Do i have to make some additional settings ? What other ways to modify java methods i should try ?
    I hope someone who has done someything like this to help me out.
    Thanks in advance

    A service handler might be the right way to run some code at the end of a service call (another way would be to make use of filters).
    First, make sure your static table is merged with ServiceHandlers.
    Secondary, change your custom method name into one that is not already in the service definition of COLLECTION_COPY_LOT (preferably a unique method name like collectionCopyLotLastAction that describes its purpose) and remove the following line from your code:
    m_service.doCodeEx("",this);Now create a service definition for COLLECTION_COPY_LOT in your custom component based on the original COLLECTION_COPY_LOT (copy paste from the original service definition) and add you own method collectionCopyLotLastAction as the last step in the service. Play with the load order to make sure CS is using your service definition of COLLECTION_COPY_LOT instead of the original.
    regards,
    Fabian

  • Filter implementation in check-in content

    Hi,
    I want to use filter which will check the file extension, size and comments (should not be null ) before check-in.
    If the file size is less than 50mb or extension is .bmp or comment is null then the filter will not allow to check-in.
    I am using CHECKIN_NEW service and then checking XCOMMENTS fields in postWebfileCreation filter,
    I am getting server log properly but content is checked-in even the content doesnot matches required criteria.
    Please help me out.
    Thanks

    Hey
    I got a simple component working on my sandbox machine that rejects documents checked in that are over a pre-defined size.
    I used the "validateStandard" event to attach to, and was able to get the filesize out based on the following code:
              String pFile = binder.getLocal("primaryFile");
              if(pFile == null || pFile.length() < 1)
                   //NO primary File available
                   SystemUtils.trace("system", "Unable to retrieve primaryFile from binder.. skip Filter");
                   return CONTINUE;
              SystemUtils.trace("system", "Checking in " + pFile);
              File primaryFile = new File(pFile);
              if (!primaryFile.exists())
                   SystemUtils.trace("system", "Could not load file.");
                   return CONTINUE;
              long fileSize = primaryFile.length();
              if (fileSize >= 10000000) //10 meg
                   throw new ServiceException("This document is too large: " + fileSize);
    HTH.
    Cheers,

  • CheckIn content

    Hi,
    I want to use filter which will check the file extension, size and comments (should not be null ) before check-in.
    If the file size is less than 50mb or extension is .txt or comment is null then the filter will not allow to check-in.
    I am using CHECKIN_NEW service and then checking XCOMMENTS fields in validateStandard filter, but its not working.
    Please help me out.
    Thanks

    like in your other post; your filter occurs only AFTER checkin (but before the document is released)
    So this will never work. After seeing your code I have some other comments:
    - if xComments is Null your code will throw a NullPointerException, try it as follows (this is how you should check for an empty string)
    String xComments = binder.getLocal( "xComments" );
    if ( xComments == null || xComments.length() == 0 ) {
       // null or empty string
    }- you can't check for null by doing a equalsIgnoreCase( "null" ), especially because if IdcService is Null it'll throw a null pointer before that, use the following instead
    String idcService = binder.getLocal( "IdcService" );
    if ( idcService == null ) {
       // now you know idcService is Null
    }- don't try to do a delete of a revision inside this filter, it makes no sense, use the right filter (and the way you do it doesn't work)
    - if you do a equals(), do it on the String literal (to make sure no NullPointerException is thrown):
    // so instead of
    boolean isEqualToSysadmin = dDocAuthor.equals( "sysadmin" ); // in this case when dDocAuthor is Null, a NullPointerException is thrown
    // do:
    boolean isEqualToSysadmin = "sysadmin".equals( dDocAuthor ); // in this case when dDocAuthor is Null, isEqualToSysadmin = falseregards,
    Fabian
    edit: you can use the tags to make your code better readable on this forum by starting your code with [ code ] and ending with [ / code ] (without all the spaces)
    Edited by: fscherpe on May 20, 2011 4:50 AM

  • Passing parameters to a Select Query

    Hi,
    I am going to add "send to" feild in the check in page, this field is a dropdown list filled by a Result set that retrieve users form User table according to the following query
    SELECT dname FROM USERS WHERE Umanager =? OR Umanager IN (SELECT Umanager FROM USERS WHERE DNAME= ?) OR DNAME IN (SELECT Umanager FROM USERS WHERE DNAME= ?)
    where ? represents the logged in user DNAME. the pomnit how can I pass this parameter from the check in page.

    Hey Younis, looks like you don't have the tracker installed, that's ok.
    A simpler way is to just write a service that calls the CHECKIN_NEW service and add that parameter you want to it; you can add this in the component you're already writing.
    These are the steps to you create a service called MY_CHECKIN:
    1. Open your custom component with component wizzard.
    2. In the Resource Definitions tab, click Add.
    3. Select Template and click Next.
    4. Click Next.
    5. Set the name to MY_CHECKIN.
    6. Set the Class to Pages.
    7. Set the Form Type to mycomponent.
    8. Set the File Name to my_service_page.htm.
    9. Click Finish.
    10. In the Resource Definitions tab, click Add.
    11. Select the Service button and click Next.
    12. Click Next.
    13. Name the service MY_CHECKIN and make it call CHECKIN_NEW and add the parameter you want.
    14. Set the Service Class to Service.
    15. Click Finish.
    16. Restart the Content Server.
    Hope that helps,

  • Metadata through user input from portal application while new check In

    Hi,
    We have a requirment to create new doc/html from portal end, and check in it into UCM with user populated metadata's
    I have few quetions
    - Can I user OOTB RichtextEditor taskflow with little customization.
    - Is it a easy option to add a check in form (custom taskflow).
    - or we have to create new custom taskflow and use CHECKIN_NEW service using RIDC api.
    Thanks
    Edited by: 953836 on Aug 21, 2012 2:20 AM

    You could go with the standard stuff, but everything depends on what user experience you want to achieve.
    a) doc/html
    What formats you want to support? HTML is OK, but .DOC (especially if it means MS-Word) might be a challenge
    b) you could use SSXA tags (see here: http://docs.oracle.com/cd/E23943_01/doc.1111/e13650/toc.htm ) which could do exactly what you ask for (via Contributor Data Files). Note, however, that this user experience is not often met with understanding. And even more important, mind this: Clarification on SSXA Support with WebCenter Portal
    c) you could also use CHECKIN_NEW_FORM (see here http://docs.oracle.com/cd/E23943_01/doc.1111/e11011/c04_core.htm#BABGBCHI ) and somehow consume its output in your custom code. By doing this, you could use Content's standard functionality, profiles, but yet, achieve the user experience similar to what Desktop Integration Suite provides.

  • Question About IDC in UCM

    Ok so I've been looking around the web for how to do IDC, and I seemed to hit a snag with what I was doing.  So what I'm trying to do is pretty much this: when a file is upload either through the CHECKIN_NEW service it sees if it has the file extension I'm looking for, if it's being checked in through CHECKIN_SEL I want to compare the file being uploaded to the file already in UCM.  To do this I looked at the check in page using "IsPageDebug=1" for checking in a new revision and found a field called "dOriginalName" that looked like what I was looking for.  Problem is when I run this filter the line "String originalFile = binder.getLocal("dOriginalName");" seems to have a NullPointerException.  Which tells me that I'm not pulling data from binder.getLocal.  So I'm wondering, am I missing something when trying to get the file name of previous revision in UCM, also how to would I pop up a error screen using IDC?

    Hi ,
    dOriginalName would be part of ResultSet DOC_INFO and to retrieve the value for it , following code snippet would be needed :
    // Retrieve the SearchResults ResultSet from the response
                DataResultSet resultSet = responseData.getResultSet("DOC_INFO");
    // Iterate over the ResultSet, retrieve properties from the content items
                for (DataObject dataObject : resultSet.getRows ()) {
                    System.out.println ("Original File Name checked-in  is: " + dataObject.get ("dOriginalName"));
                    System.out.println ("######");
    Hope this helps .
    Thanks,
    Srinath

  • Unable to checkin a document using 'CHECKIN_UNIVERSAL" service through java

    Hi All,
    I am trying to checkin a document through java code and following is my code part for the same( UCM 11g)
    But whenever i run this code part, it throws the following exception
    intradoc.common.ServiceException:csUnableToCheckin,<null>!csUnabletoExecMethod,populateMissingDocumentValues
    Can anyone help me with this?
    Code part
    private void checkinDoc()
    File f=new File("D:/testfolder/BPEL.pdf");
    System.out.println(" absolute path :"+f.getAbsolutePath());
    String filePath = f.getAbsolutePath().replace("\\", "/");
    checkedOutDataBinder.putLocal("IdcService", "CHECKIN_UNIVERSAL");
    checkedOutDataBinder.putLocal("dDocTitle","test");
    checkedOutDataBinder.putLocal("dDocAuthor", "weblogic");
    checkedOutDataBinder.putLocal("dDocType","Document");
    checkedOutDataBinder.putLocal("dSecurityGroup","public");
    checkedOutDataBinder.putLocal("doFileCopy", "1");
    checkedOutDataBinder.putLocal("primaryFile", filePath);
    checkedOutDataBinder.putLocal("xCollectionID", "425180507509000004");
    checkedOutDataBinder = executeService(checkedOutDataBinder,
    "weblogic");
    private DataBinder executeService(final DataBinder binder,
    final String userName) throws DataException, ServiceException
    // obtain a connection to the database
    Workspace workspace = getSystemWorkspace();
    // check for an IdcService value
    String cmd = binder.getLocal("IdcService");
    if (cmd == null)
    throw new DataException("!csIdcServiceMissing");
    // obtain the service definition
    ServiceData serviceData = ServiceManager.getFullService(cmd);
    if (serviceData == null)
    throw new DataException(LocaleUtils.encodeMessage(
    "!csNoServiceDefined", null, cmd));
    // create the service object for this service
    Service service = ServiceManager.createService(serviceData.m_classID,
    workspace, null, binder, serviceData);
    // obtain the full user data for this user
    UserData fullUserData = getFullUserData(userName, service, workspace);
    service.setUserData(fullUserData);
    // binder.m_environment.put(REMOTE_USER, userName);
    ServiceException error = null;
    try
    // init the service to not send HTML back
    service.setSendFlags(true, true);
    // create all the ServiceHandlers and implementors
    service.initDelegatedObjects();
    // do a security check
    service.globalSecurityCheck();
    // prepare for the service
    service.preActions();
    // execute the service
    service.doActions();
    // do any cleanup
    service.postActions();
    // store any new personalization data
    // service.updateSubjectInformation(true);
    //service.updateTopicInformation(binder);
    catch (ServiceException e)
    error = e;
    e.printStackTrace();
    finally
    // Remove all the temp files.
    service.cleanUp(true);
    workspace.releaseConnection();
    // handle any error
    if (error != null)
    // throw new ServiceException(error.m_errorCode, error
    // .getMessage());
    return binder;
    }

    I have been running into the same exception, albeit with UCM 10g:
    Content item 'xxx' was not successfully checked in. Unable to execute service method 'populateMissingDocumentValues'. (System Error: Runtime error: java.lang.NullPointerException
    at collections.CollectionMetaHandler.validateMetaDataDates(CollectionMetaHandler.java:771)
    at collections.CollectionMetaHandler.fillInUndefinedMeta(CollectionMetaHandler.java:806)
    at collections.CollectionUserHandler.setUndefinedMetaData(CollectionUserHandler.java:1353)
    at collections.CollectionUserHandler.populateMissingDocumentValues(CollectionUserHandler.java:1275)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
    at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
    at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    at intradoc.server.Service.doCodeEx(Service.java:490)
    at intradoc.server.Service.doCode(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
    at intradoc.server.Service.doAction(Service.java:452)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
    at intradoc.server.Service.doActions(Service.java:447)
    it seems to have something to do with the xCollectionID.
    If I don't set this, it works fine (checking in and out, checking in new revision). If I set it I can check in a new item using CHECKIN_NEW but I am unable to use CHECKIN_UNIVERSAL to check in a new revision.
    Any pointers would be appreciated.
    Edited by: Jaap on 6-jun-2011 2:41
    Edited by: Jaap on 6-jun-2011 3:09

  • Service to checkin file if it does not exist, else version the file

    Hi All,
    From java layer I use WEBDAV and use PUT command and this command creates a new file if it does not exist, and if the file exists it versions the existing file.
    I have developed a java component to unzip a folder and checkin all individual files and folders into UCM whenever a zip file is checked in.I would like similar feature in my UCM component.i.e whenever files are unzipped they should always be versioned if they exist.I use the below code,but it always creates a new file(even if file with same name exists in the same folder)
    m_binder.setEnvironment(SharedObjects.getEnvironment());
    m_binder.putLocal("dDocName","");
    m_binder.putLocal("IsAutoNumber", "true");
    m_binder.putLocal("AutoNumberPrefix", "olm_");
    m_binder.putLocal("IdcService","CHECKIN_NEW");
    m_binder.putLocal("dDocTitle",entityName);
    m_binder.putLocal("xCollectionID",parentId);
    m_binder.putLocal("dDocType", "Document");
    m_binder.putLocal("dSecurityGroup","Public");
    m_binder.putLocal("dDocAuthor","sysadmin");
    m_binder.putLocal("dCreateDate","");
    m_binder.putLocal("primaryFile", entryName);
    executeService(ws, m_binder,"sysadmin",true);
    So, I would like to know, if there is a service to achieve the same or is there a parameter I can add in m_binder.putLocal to achieve the same? OR am I suppose to query the UCM Database to check for existence of the file and if it exists I need to manually check out and check it in?
    Thanks,
    Shwetha

    Thanks Fabian and Ryan for your feedback.
    So I queried db to retrieve the ddocName and if no rows are returned my code checks in new file. But if rows are returned I checkout the file using CHECKOUT_BY_NAME and then checkin using CHECKIN_UNIVERSAL using same ddocName.
    Creating/checking in new file is successful.
    For existing files the checkout is successful.I also confirmed the file is checked out by querying documenthistory and ensuring a new row is created with dction = 'Check out'
    But post checkout when i try to re-check using CHECKIN_UNIVERSAL command, I receive the below exception
    intradoc.common.ServiceException: !csUnableToCheckIn,OLM_002103!csCheckinItemExists
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2326)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)
    at intradoc.server.Service.createServiceException(Service.java:2315)
    What am I missing here?
    Code snippet:
    m_binder.setEnvironment(SharedObjects.getEnvironment());
    m_binder.putLocal("IsAutoNumber", "true");
    m_binder.putLocal("AutoNumberPrefix", "olm_");
    String docName = getDocname(ws, parentId, entityName);
    if(docName != null && docName.equals("FILENOTFOUND")) {
    System.out.println("Creating new file");
    System.out.println("parentId is "+ parentId);
    m_binder.putLocal("IdcService","CHECKIN_UNIVERSAL");
    m_binder.putLocal("dDocName","");
    m_binder.putLocal("dDocTitle",entityName);
    m_binder.putLocal("xCollectionID",parentId);
    m_binder.putLocal("dDocType", "Document");
    m_binder.putLocal("dSecurityGroup","Public");
    m_binder.putLocal("dDocAuthor","sysadmin");
    m_binder.putLocal ("doFileCopy", "1");
    m_binder.putLocal("dCreateDate","");
    m_binder.putLocal("primaryFile", entryName);
    executeService(ws, m_binder,"sysadmin",true);
    System.out.println("Created file successfully");
    }else{
    System.out.println("Check out file");
    System.out.println("parentId is "+ parentId);
    m_binder.putLocal("IdcService","CHECKOUT_BY_NAME");
    m_binder.putLocal("dDocName",docName);
    executeService(ws, m_binder,"sysadmin",true);
    System.out.println("File checked out successfully");
    System.out.println("Check in file");
    m_binder.putLocal("IdcService","CHECKIN_UNIVERSAL");
    m_binder.putLocal("dDocName",docName);
    m_binder.putLocal("dDocTitle",entityName);
    m_binder.putLocal("xCollectionID",parentId);
    m_binder.putLocal("dDocType", "Document");
    m_binder.putLocal("dSecurityGroup","Public");
    m_binder.putLocal("dDocAuthor","sysadmin");
    m_binder.putLocal ("doFileCopy", "1");
    m_binder.putLocal("dCreateDate","");
    m_binder.putLocal("primaryFile", entryName);
    executeService(ws, m_binder,"sysadmin",true);
    System.out.println("Checked in file successfully");
    public String getDocname(Workspace ws, String folderId, String originalName)
    throws DataException,ServiceException
    System.out.println("Entered getDocname");
    String val = new String("FILENOTFOUND");
    String sql = "select a.ddocname from documenthistory a, docmeta b, documents d " +
    "where a.did = b.did and a.did = d.did and d.DORIGINALNAME = '" + originalName +
    "' and b.xcollectionid = '" + folderId + "'";
    System.out.println("sql query is : " + sql);
    ResultSet rs = ws.createResultSetSQL(sql);
    if(rs == null) {
    System.out.println("Resultset for getDocname is empty");
    throw new ServiceException("Resultset for getDocname is empty");
    DataResultSet result = new DataResultSet();
    result.copy(rs);
    if(result.getNumRows() >= 1) {
    result.first();
    val = result.getStringValue(0);
    System.out.println("ddocname is :" + val);
    return val;
    else {
    System.out.println("FILENOTFOUND");
    return val;
    Thanks,
    Shwetha

  • Global rules not kicking off when calling CHECKIN_NEW webservice

    Hi All,
    We are trying to call CHECKIN_NEW/CHECKIN_UNIVERSAL web services with mandatory fields like doctype, securitygroup, title, primary file etc..
    It is working fine, but the global rules were not kicking off.
    Ex: Say, we have a rule that says Field_A is mandatory when SecurityGroup=Public.
    But when we are invoking the webservice with SecurityGroup=Public, content is getting checked-in even though we are not passing the Field_A value.
    We need the global rules to kick-off and give us error/warning that there is field missing...
    Can you please let us know if we are missing something here, or there is other way to get this requirement?
    Thanks in advance,
    Cheers,
    -V

    Hi,
    I now tested with RIDC code below, but still the global rule is not kicking off. I ahve a global rule, which says "xSwcDocumentSubType" should be mandatory. But if we see code below, i commented out that value, but still content is getting checked in.
    Can you please point me if i am missing anything here?
    IdcClientManager manager = new IdcClientManager();
    // build a client that will communicate using the HTTP protocol
    IdcClient idcClient = manager.createClient("http://xxx:xxx/cs/idcplg");
    // create an identity with a password
    IdcContext userPasswordContext = new IdcContext("xxx", "xxx");
    // create request
    DataBinder binder = idcClient.createBinder();
    binder.putLocal ("IdcService", "CHECKIN_NEW");
    // get the binder
    binder.putLocal ("dDocTitle", "RIDC File3");
    binder.putLocal ("dDocType", "Statement");
    //binder.putLocal ("xSwcDocumentSubType", "317");
    binder.putLocal ("dSecurityGroup", "Public");
    // add a file
    //binder.addFile ("primaryFile", new TransferFile ("test.doc"));
    binder.addFile ("primaryFile", new File ("D:\\RIDC.txt"));
    // check in the file
    ServiceResponse response = idcClient.sendRequest(userPasswordContext, binder);
    String responseString = response.getResponseAsString ();
    System.out.println(responseString);
    Edited by: 921097 on 18/03/2012 17:59

Maybe you are looking for

  • Subcontracting Using Scheduling agreement

    I am trying to carry out subcontracting using Scheduling Agreement, but not able to achieve the same. Please let me know stepwise porocedure to carry out the same.

  • Mac Mini Server (2010) & Windows Server 2008

    Hi, Would it be possible to boot, install and run Windows Server 2008 on the Mac Mini Server, replacing Snow Leopard Server OS? I assume I need the SuperDrive or similar DVD drive to realize this scenario. Regards, sb

  • Connecting two sun boxes directly

    I have a V490 and V890; both running Solaris 10 (build 6-06). Both are connected via separate nics to both a 10. and external networks. These both work fine. I have an extra single head NIC in one machine and an integrated dual head NIC in the V490 a

  • Comp Management Workflow

    Hello Could anyone help me out as to how would I need to proceed with making a document which would depict the work flow involved in configuration in R/3 for merit CM from an object point of view Thanks Message was edited by: John Abraham

  • Display system time in text field

    hi all, I want to diplay the current system time (format: hh:mm) in a text field on screen ... and update the displayed time every minute. How would I implement it ? Thanks for your assistance.