on 03-05-2008 9:50 PM
Hi,
Is it possible to use IPortalComponentRequest and IPortalComponentResponse on Web Dynpro?
Thanks,
Bruno
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"
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
Why do you need it?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.