cancel
Showing results for 
Search instead for 
Did you mean: 

Use IPortalComponentRequest and IPortalComponentResponse on Web Dynpro

Former Member
0 Kudos

Hi,

Is it possible to use IPortalComponentRequest and IPortalComponentResponse on Web Dynpro?

Thanks,

Bruno

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I used this below document to access pcd contents like roles, worksets.

I used the same code in webdynpro, its worked. why would you need Portal component request and response.

but you just need to use these jar files in classpath

com.sap.portal.pcm.admin.apiservice_api.jar

com.sap.security.api.jar

gl_api.jar

prtjndisupport.jar

give the Sharing reference in webdynpro refernces for "PORTAL:sap.com/com.sap.portal.ivs.connectorservice"

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9...

you can see the below code

try {

Hashtable env = new Hashtable();

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

env.put(Context.SECURITY_PRINCIPAL, WDClientUser.getCurrentUser().getSAPUser());

env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);

InitialContext initialContext = null;

DirContext dirCtx;

initialContext = new InitialContext(env);

dirCtx = (DirContext) initialContext.lookup("pcd:portal_content/");

PcdSearchControls pcdSearchControls = new PcdSearchControls();

pcdSearchControls.setReturningObjFlag(false);

pcdSearchControls.setSearchScope(

PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);

dirCtx.addToEnvironment(

Constants.APPLY_ASPECT_TO_CONTEXTS,

Constants.APPLY_ASPECT_TO_CONTEXTS);

NamingEnumeration ne =

dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview)",

pcdSearchControls);

while (ne.hasMoreElements()) {

IPcdSearchResult searchResult =

(IPcdSearchResult) ne.nextElement();

String location = "pcd:portal_content/" + searchResult.getName();

// Get the full pcd path of the iview.

wdComponentAPI.getMessageManager().reportSuccess(location);

}

} catch (WDUMException e) {

wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());

} catch (NamingException e) {

wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());

}

Regards,

Naga

Edited by: Naga Raju Meesala on Mar 6, 2008 6:43 PM

Former Member
0 Kudos

Hi Naga,

Perfect!!! This solved my problem.

Thanks.

Regards,

Bruno

Former Member
0 Kudos

Naga,

Where can I find these JAR files that you have also mentioned?

com.sap.portal.ivs.api_iview_api.jar

com.sap.portal.ivs.api_landscape_api.jar

com.sap.portal.pcm.admin.apiservice_api.jar

com.sap.portal.pcd.basicrolefactory_api.jar

com.sap.portal.pcd.glservice_api.jar

gl_api.jar

jndisupport.jar

Thanks...

Answers (1)

Answers (1)

Former Member
0 Kudos

Why do you need it?

Armin

Former Member
0 Kudos

Hi Armin,

I need it to access access PCD Contents like iViews and Their Properties.

I´m with this thread open, where i say what i need to do.

Thanks for your attention.

Bruno

Former Member
0 Kudos

But the information you want to display is not accessed using these interfaces, isn't it?

Armin

Former Member
0 Kudos

So... The examples that i found use this interface...

Do you have a other way to do this?

Thanks,

Bruno

Former Member
0 Kudos

Which information do you get from these interfaces?

Armin

Former Member
0 Kudos

Hi Armin,

I need just access PCD Contents. The examples that i found use these interfaces...

Regards,

Bruno