Hello All.
DFS has "getObjectContentUrls" functionality:
ObjectContentSet[] urlList = objectService.getObjectContentUrls(objects);
Does the same exist for DFC?
Thanks
Hi,
I've created a Document Get ACS url for an object using DFC on this code sample.
Cheers,
Mike
Thank you very much, Mike!
It works. You really helped me.
Best regards,
Alexander
Hi Miklos, Alexander,
You actually need not incur the cost of creating and executing export operation to get URL for a sysobject which can be used for content transfer through ACS.
The functionality is exposed in IDfSysObject itself.
Below is the code to achieve it:
private List<String> getAcsURLs(String objId) throws DfException
{
IDfSession session = getDfSession();
IDfSysObject obj = (IDfSysObject) session.getObject(new DfId(objId));
IDfEnumeration acsRequests = obj.getAcsRequests("crtext",0,null,constructPreferences());
List<String> URLs = new ArrayList<String>(); while (acsRequests.hasMoreElements()) { IDfAcsRequest acsRequest = (IDfAcsRequest) acsRequests.nextElement(); String acsUrl = acsRequest.makeURL();
URLs.add(acsUrl);
System.out.println("ACS URL for object " + objId +acsurl );
}
return URLs;
private static IDfAcsTransferPreferences constructPreferences () { IDfAcsTransferPreferences transferPrefs = CLIENT_X.getAcsTransferPreferences(); transferPrefs.preferAcsTransfer(true); transferPrefs.allowBocsTransfer(false); return transferPrefs; }
PS" Because ACS transfer is precondition for URLs to be generated, ACS URLs are also not generated for XML, virtual docs and objects whose content need to be manipulated on application server.
Regards,
Ravi
Hi Ravi,
I have used your code, but no ACS URL returned for me. I have the following configurations
1) ACS Server is running. Successfully able to access ACS servlet URL using browser
2) By default the ACS preferences have ACS enabled
3) No errors in the ACSServer log.
Mike,
I have used your code aswell. Though documents are exported, no ACS urls are returned.
Mohan
You might need to restart your Java Method Server if you have restarted your (docbase and) docbroker without restarting the Java Method Server.
This is because ACS registers itself to the docbroker on startup, and if this fails, then no ACS url is returned as docbroker does not know about it.
You can check this by running the dmqdocbroker tool:
$DM_HOME/bin/dmqdocbroker -a -c getservermap YOUR_REPO_NAME
I have restarted docbroker, docbase and JMS multiple times, still it show's the same behaviour, no URLs printed.
And what do you get from the dmqdocbroker command?
Hi Mark,
I ran the utility with proper arguments. It says the docbroker running doesn't know the specified docbase. I'm sure, my docbase is projecting to the docbroker running at this perticular port. These same docbroker details we are using to access docbase using webtop or DFC. The server.ini file of the docbase also has this docbroker entry.
[DM_DOCBROKER_E_NO_SERVERS_FOR_DOCBASE]error: "The DocBroker running on host (machineName:1489) does not know of a server for the specified docbase (docbaseName)"
I think, this utility is not running properly in our environment.
@LakeAlex
DFS Code to download the content from repository into the file system is it possible
if it is possible please provide the DFS code.