Skip to Content
0
Former Member
May 13, 2009 at 03:27 PM

Error in TrustedSession Authentication scenario

35 Views

Hi,

i am trying to register repository for notifications. I'm creating a trusted session between Java API and MDM. here's the code i'm using.

the repositories in the server and return the repo id of my repository.
CreateUserSessionCommand createUserSessionCommand =new CreateUserSessionCommand(connection);
createUserSessionCommand.setRepositoryIdentifier(repId);
createUserSessionCommand.setDataRegion(getRegion(connection, repId)); //once again, this method gives me the dataRegion for English [US]
createUserSessionCommand.execute();
String session = createUserSessionCommand.getUserSession();

TrustedUserSessionCommand trustCmd = new TrustedUserSessionCommand(connection);
trustCmd.setSession(session);
trustCmd.setUserName("Q02466");
trustCmd.execute();

RepositorySessionContext repCtxt = new RepositorySessionContext(serverName, RepositoryNameAsString, userName);

But when i reach the last line, i get the following error

3/05/2009 15:25:57 com.sap.mdm.logging.MdmLogger error
GRAVE: Can not authenticate repository session '<server=165.28.46.94 serverUser=Admin repository=MYREPO_DEV user=MyUser>' because user password is not specified

In trusted scenario, i don't have a password to be sent to MDM. How shall i create a repository context here?

Thanks

ak