RIDC API allows you to call IDC Services from Java programs. You can develop services that integrate with WebCenter Content server reliably. If you are using RIDC to check-in documents into WebCenter Content, and trying to set the Document Create Date (dCreateDate or dInDate), you should encode the date in the standard iso8601 date format (The default Content Server setting uses iso8601). You can accomplish this by using the encodeDate method of oracle.stellent.ridc.model.impl.DataObjectEncodingUtils object provided by RIDC API
The most common error if you do not format the date properly is “csDateParseError” which is caused by !syUnableToFindText,/ method and throws !syUnableToParseDate exception.
The following code shows how to encode the date
//Import the required classes: import java.util.Date; import oracle.stellent.ridc.model.impl.DataObjectEncodingUtils; //Set the dCreateDate to that of a local files last modified date. File sourceFile = new File(localFile); String dCreateDate = DataObjectEncodingUtils.encodeDate(new Date(sourceFile.lastModified())); //Optionally, you can set the Date Format and Time Zone to specific values if required in the DataBinder object. binder.putLocal("UserDateFormat", "iso8601"); binder.putLocal("UserTimeZone", "UTC"); //Set the dCreateDate in the DataBinder object binder.putLocal("dCreateDate",dCreateDate);
If your Content Server date format was changed from iso8601, you can determine the setting by using the following service and then use the same in your code.
binder.putLocal("IdcService", "PING_SERVER"); binder.putLocal("tableNames", "CoreFeatures"); ServiceResponse response = idcClient.sendRequest(idcContext, binder); //Get the User Date Format and User Time Zone since DataBinder resultData = response.getResponseAsBinder(); String userDateFormat = resultData.getLocal("UserDateFormat"); String userTimeZone = resultData.getLocal("UserTimeZone");
If you are still having issues with setting the date, your Managed Server logs (UCM_server1) or System Audit Trace with “systemdatabase” and “requestaudit” selected (Administration > System Audit > Tracing section), should give you more information to troubleshoot. The following is a System Audit Trace information when the date is not encoded.
>services/3 09.16 21:43:46.638 IdcServer-41011 !csUserEventMessage,weblogic,CIS!$ intradoc.common.ServiceException: !csServiceDataException,CHECKIN_NEW_SUB,makeNewRevClass!$ services/3 09.16 21:43:46.638 IdcServer-41011 *ScriptStack CHECKIN_NEW_SUB services/3 09.16 21:43:46.638 IdcServer-41011 3:doScriptableAction,**no captured values**3:doSubService,**no captured values**CHECKIN_NEW_SUB,**no captured values**3:makeNewRevClass,**no captured values** services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2220) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.buildServiceException(Service.java:2404) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.createServiceExceptionEx(Service.java:2398) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.createServiceException(Service.java:2393) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.ServiceRequestImplementor.handleActionException(ServiceRequestImplementor.java:1860) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1810) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.doAction(Service.java:566) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1527) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.doActions(Service.java:561) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1390) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.executeSubServiceCode(Service.java:4189) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:1266) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.executeServiceEx(Service.java:4184) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.executeService(Service.java:4168) services/3 09.16 21:43:46.638 IdcServer-41011 at intradoc.server.Service.doSubService(Service.java:4078) services/3 09.16 21:43:46.638 IdcServer-41011 at sun.reflect.GeneratedMethodAccessor459.invoke(Unknown Source) services/3 09.16 21:43:46.638 IdcServer-41011 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) services/3 09.16 21:43:46.638 IdcServer-41011 at java.lang.reflect.Method.invoke(Method.java:606)
Added here: https://jonathanhult.com/blog/2012/12/ridc-examples/