Skip to Content
0
Former Member
Nov 12, 2006 at 01:24 PM

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

38 Views

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.