cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in getting Portal Mapped user and password in Web Dynpro iView

Former Member
0 Kudos

I am developing a webdynpro iview.My app need to read mapped user and password form a system in Portal runtime.

I used the following codes in my Web Dynpro java program:

IWDClientUser user = WDClientUser.getCurrentUser();

IUser iuser = user.getSAPUser();

IUserMappingService iums = (IUserMappingService)WDPortalUtils.getServiceReference(IUserMappingService.KEY );

// IUserMappingService iums = (IUserMappingService)

// PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);

IUserMappingData iumd = iums.getMappingData (systemalias, iuser);

Map map = new HashMap ();

iumd.enrich(map);

String userid = (String)map.get( "user" );

String pwd = (String)map.get ("mappedpassword");

I've add a sharing references in project properties,the value is "PORTAL:sap.com/com.sapportals.portal.prt.service.usermapping.IUserMappingService"

But when I run the iview on my Portal, it goes wrong, the message is:

com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application ''local/HomePage'' for startup. Reason= Clusterwide exception: Failed to start dependent library ''com.sapportals.portal.prt.service.usermapping.IUserMappingService'' of application ''local/HomePage''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?

at com.sap.engine.services.webdynpro.WebDynproContainer.prepareStart(WebDynproContainer.java:1490)

at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:231)

at com.sap.engine.services.deploy.server.application.StartTransaction.prepareLocal(StartTransaction.java:184)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesLocal(ApplicationTransaction.java:365)

at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:117)

Anybody can help me?And are there anyother methods can get mapped user and password of Portal systems in Web Dynpro JAVA.

Accepted Solutions (1)

Accepted Solutions (1)

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Wayne,

Did you added com.sap.security.api.jar to your webdynpro project. if not follow this steps.

1. Right-click the project in Eclipse or SAP NetWeaver Developer Studio.

2. Select Properties.

3. Choose Java build path -> Libraries -> Add Variable -> Select variable WD_RUNTIME -> Extend -> com.sap.security -> lib -> com.sap.security.api.jar.

I hope this should solve your problem.

Regards, Suresh KB

Former Member
0 Kudos

Hi Suresh,

Thank you very much for your reply, I am not in my office, so I'll try your advice later.

I've added com.sap.security.api.jar as External JAR in my project, What's the difference of these properties?

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi wayne,

Name of reference is "PORTAL:sap.com/com.sap.portal.usermapping" NOT "PORTAL:sap.com/com.sapportals.portal.prt.service.usermapping.IUserMappingService".

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi

Thank you very much, my problem has been solved!