cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro and Portal PCD Access

Former Member
0 Kudos

Hello,

I just finished a lot of desperate testing trying to access the portal pcd

from webdynpro on the same machine. also i read lots and lots of forum

contributions but the best i could get was a class cast exception when

i tried to create a new delta link in an existing folder ...

the problem always arises with this statement

<b>IiView myIView =(IiView)iCtx.lookup(".......");</b>

debugging the returned object gives me following variants

com.sap.portal.pcm.iview.admin.AttributeSetiView

com.sap.portal.pcm.iview.admin.AdminBaseiView

com.sap.portal.pcm.page.admin.AttributeSetPage

com.sapportals.portal.pcd.gl.PcdGlContext

based on the Constants.REQUESTED_ASPECT assignment

my questions:

1) has anybody succeeded in accessing the pcd from dynpro

2) any working examples available

3) what am i dooin wrong

thanks for any help

ulrich scherb.

i have done the following

<b>sharing references:</b>

api_landscape

glservice

api_iview

apiservice

basicrolefactory

<b>java build path</b>

api_iview_api.jar

api_landscape_api.jar

api_portalpcm_api.jar

bascirolefactory_api.jar

glservice_api.jar

apiservice_api.jar

gl_api.jat

prtapi.jar

prtjndisupport.jar

also tried with copies of jar in the projects lib folder ...

import javax.naming.Context;

import javax.naming.InitialContext;

import java.util.Hashtable;

import javax.naming.NamingException;

import com.sap.portal.directory.Constants;

import com.sap.portal.pcm.admin.PcmConstants;

import com.sapportals.portal.pcd.gl.IPcdContext;

import com.sapportals.portal.pcd.gl.IPcdAttribute;

import com.sap.security.api.IUser;

import com.sap.portal.pcm.iview.IiView;

import com.sap.portal.pcm.iview.IiViews;

import com.sap.portal.pcm.IObjectsManager;

import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;

import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;

import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;

import com.sap.tc.webdynpro.progmodel.api.WDMessage;

import com.sap.tc.webdynpro.services.message.WDMessageType;

import com.sapportals.portal.prt.runtime.PortalRuntime;

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);

env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);

env.put(IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, epUser);

Context iCtx = new InitialContext(env);

IiView myIView =(IiView)iCtx.lookup(".......");

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Ulrich,

I have working example of PCD-WD integration. I can send it to you, just give me your mail id.

Best regards, Maksim Rashchynski.