Skip to Content
author's profile photo Former Member
Former Member

No LogonDataBroker available

Hallo community,

following problem. I want to create a JCO-Coonection to backend SAP System by using information from landscape and usermanagment service in the pdk enviroment.

First step I made was to create a new user in KMUsers file.

part of KMUser:

user.application.id=SAPSystem

user.application.SAPSystem.additionallogondata=

user.application.SAPSystem.userencryptedpassword=pwd

user.application.SAPSystem.username=user

user.firstname=user

user.id=pwd

user.lastname=user

user.locale=de_de

user.password=pwd

user.roles=portal_demo, portal_admin

After this I configured system- an jcoDestination.xml so that the system has to use the UIDPW-Logon method.

part of system.xml:

      Â

Third step I made was to map portal user to a user of backend SAP system (see part of KMUser). After I made a successful test of jcoDestination to backend SAP system in landscape cockpit.

The last step I made was to create a JCO Connection to SAP System by using usermanagment service.

part of code:

ILandscapeService landscapeService = (ILandscapeService) request.getService(ILandscapeService.KEY);

Properties props = landscapeService.lookupJCOLoginParams("SAPSystem");

Locale locale = request.getLocale();

String language = locale.getLanguage();

if (language != null) {

props.setProperty("LANG", language.toUpperCase());

}

IUserManagementService umService = (IUserManagementService) request.getService(IUserManagementService.KEY);

IUserFactory userFactory = umService.getDefaultFactory();

IUser myUser= null;

try {

myUser = userFactory.getUser(request.getUser().getUserId());

} catch (UserManagementException ume){

}

ILogonDataBroker authen = myUser.getMappingInfo();

authen.enrich(request.getServletRequest(),props,landscapeService.lookupJCOSystem(sapSystem),landscapeService.lookupJCOLogonMethod(sapSystem));Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â

JCO.Client  jcoClient = JCO.createClient(props);

jcoClient.connect();

These Trial fails because the return value of function call "curentUser.getMappingInfo()" of was null.

Does anybody have an idea want kind of mistake i made. I don't have anybody

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Dec 21, 2003 at 06:34 PM

    KMUser and PortalUser are not the same.

    Try to use a PortalUser.

    BR,

    Oliver

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sorry Oliver, I don't understand the point of your answer. Let me repeat: if I would like to use SSO etc. in a pdk enviroment, I have to create a KMUser in the corresponding files. Up to now I thought this (KM)User simulate a valid PortalUser in pdk enviroment. You answered that Portal- and KMUser in pdk enviroment aren't the same. But where and how should I create valid PortalUser in pdk enviroment to execute successfully above mentioned source-code.

      Thanks