Is there a Java equivalent of "C API SECRefreshIdFile"?

I need to refresh the ID file on a user rename or certifier change. I came accross the C API SECRefreshIdFile that has been introduced in the 7.x release. Is there a corresponding Java API. I could not see one. Please respond. I am planning to write a C program and call it in my Java code. But if there is an API already available in Java and hiding somewhere please let me know ASAP.

Thanks,

Neville

Subject: Is there a Java equivalent of “C API SECRefreshIdFile”?

SECRefreshIDFile in the Notes C API doesn’t work. I have reported it to Lotus support and this is part of the answer. "Action Taken: This is a documented issue and Lotus development is aware

of it. Although the error is different the SPRs relating to this issue

are RPAI6LRQ3V and LJWG6SF3VF"

and

"The issue was reported to us with this PMR and a Customer Report for it

has already been created. We do not have a timeline from development as

to when this will be fixed "

This function is mentioned in an article from Lotus over a year ago but obviously not tested.

My PMR is 09690 999 846.

To bad, this is a critical function if you want to automate ID file management.

Subject: RE: Is there a Java equivalent of “C API SECRefreshIdFile”?

Both of those SPRs relate to processing renames, and SECRefreshIdFile does far more than just renames. And have you checked out 7.0.2 yet?

Subject: RE: Is there a Java equivalent of “C API SECRefreshIdFile”?

Thanks guys for the quick response. I have Lotus Notes Client 7.0.2 (however our Domino Server version is 6.5.5). I wrote a C program to refresh the ID file as follows:

#include <stdio.h>

#include <string.h>

/* Include the header files that we will need from the Lotus C API for Notes/Domino */

#include <global.h>

#include <nsfdb.h>

#include <nif.h>

#include <osmem.h>

#include <miscerr.h>

#include <kfm.h>

#include <osmisc.h>

/* Functions defined in this file */

void APIErrHandler (STATUS);

/* The main() function */

int main(int argc, char *argv){

/* Local variables */



char					*serverName = "10.xxx.xxx.xx";

char					idFilePath[256] = "";

char					password[256] = "";

DWORD					retFlags;

STATUS					error = NOERROR;	/*return status from API calls */

/* Initialize the Notes/Domino runtime */



if (error = NotesInitExtended (argc, argv)){

	printf("\nError: Unable to initialize Notes.\n");

	return (1);

}

printf("\nNotes init done.\n");



/* Make sure we have the needed arguements */



if (argc != 3){

	printf("\nUsage: LotusNotesIdRefresh.exe <idfilepath> <password>");

	NotesTerm();

	return (1);

}else{

	printf("\nDoing a string copy.\n");

	/* Concatenate the arguements to form the key */

	strcpy_s(idFilePath, 256, argv[1]);

	strcpy_s(password, 256, argv[2]);

	printf("\nDone with string copy.\n");

}



printf("\nRefreshing the ID file.\n");



if(error = SECRefreshIdFile(

	idFilePath,

	password,

	serverName,

	&retFlags,

	0,

	NULL)){



	APIErrHandler (error);

	NotesTerm();

	return (1);



}

printf("\nID file successfully refreshed.\n");

/* Shutdown the Notes runtime and exit the function */

NotesTerm();

return (0);

}

/* The error handler function */

void APIErrHandler (STATUS error)

{

STATUS  errorid = ERR(error);

char    errormsg[200];

WORD    len;



/* Obtain the error message*/



len = OSLoadString (NULLHANDLE,

                         errorid,

                         errormsg,

                         sizeof(errormsg));



/* Print it. */



printf ("Error : %s", errormsg);

}

The ID file is manually copied to e:\idstore directory. The fullname, firstname, lastname in person document in NAB is changed. I than run this program as follows:

E:\LotusNotesIdRefresh\Debug>LotusNotesIdRefresh.exe “E:/idstore/hntest24.id” password

The following is the program output:

Notes init done.

Doing a string copy.

Done with string copy.

Refreshing the ID file.

The ID file being used is: F:\Program Files\lotus\notes\data\mytest.id

Enter password (press the Esc key to abort):

ID file successfully refreshed.

Problem:

I don’t see the ID file E:/idstore/hntest24.id being updated. The timestamp of this file on the file system is not changed.

Am I missing something? I would appreciate it if someone can tell me if I am missing anything.

Thanks,

Neville

Subject: RE: Is there a Java equivalent of “C API SECRefreshIdFile”?

I would also like to add that, I have initiated an adminp “rename” request and it is sitting in admin4.nsf as “Initiate Rename in Domino Directory”. I run my C program after I fire an adminp rename.

Thanks,

Neville

Subject: RE: Is there a Java equivalent of “C API SECRefreshIdFile”?

If you haven’t already seen it, take a look at this post: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/b30b2cbf04a53b83852571f0003e7584?OpenDocument - it details some of the caveats of using SECRefreshIDFile on a workstation.

I had experienced an issue in 7.0.1 FP1 where SECRefreshIDFile would not update an ID after a user rename - this appears to have been fixed in 7.0.2

Subject: RE: Is there a Java equivalent of “C API SECRefreshIdFile”?

Thanks Matt.

Where can I download Lotus C API for Notes/Domino 7.0.2 from? Could you send me the link if you have it?