How to accessing portal services
Hi All
I am saravanan. i have doubts. Can u plz solve my doubts?.
1). How to Accessing Portal Services from a Webdynpro application?.
2). Portal Eventing with Webdynpro and other Applications?.
3). single signon from Webdynpro applications?.
These are my doubts. Could u plz solve my problem.
If u have any material or PPT or PDF files kindly send my mail.
This is my mail id : [email protected]
Thanking You
Saravanan
Hi Swathi
I'm trying to do exactly the same, i have a webdynpro application and i'm trying to access KM libraries to get the full list of metadata properties. But i'm getting and error while trying to get the service on the following code:
Property propertyAux = null;
IResourceFactory resFactory = ResourceFactory.getInstance();
IRepositoryServiceFactory serFactory = resFactory.getServiceFactory();
IPropertyConfigurationService propConfigService = (IPropertyConfigurationService) serFactory.getService("PropertyConfigurationService");
IMetaNameListIterator i = propConfigService.getMetaModel().nameIterator();
while (i.hasNext()) {
IMetaName metaname = i.next();
if ( metaname.getDocumentPatterns()!= null){
propertyData.setId(metaname.getName());
propertyData.setName(metaname.getLabel(locale));
propertyData.setNamespace(metaname.getNamespace());
propertyData.setDescription(metaname.getDescription(locale));
propertyList.add(propertyData);
The error on the trace is this one:
System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]_29##0#0#Error##Plain###Configuration Framework error: unable to create an IConfigClientContext instance from an EP5 userInitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.#
System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]_29##0#0#Error##Plain###InitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.
Could you please give me a hand on this one?
Thanks in advance
Similar Messages
-
Need info on Accessing portal services within a Web Dynpro application
Hi,
I need information on Accessing portal services within a Web Dynpro application.I want to explore this topic.Can anyone give useful links?
Thanks in advance.
Rajani NHi
how to reference a portal service with web dyn pro ?
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/how%20to/how%20to%20access%20a%20portal%20service%20within%20a%20web%20dynpro%20java%20application.pdf
http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/portal/WDPortalUtils.html
Best Regards
Jakub Krecicki -
How to acces portal services in webdynpro
Hi I want to access portal services from webdynpro, i red that for that we have to provide sharing reference in webdynpro application. which will be
PORTAL :< Vendor name>/<Full qualified name of the portal service>
my question is how to find out vendor name and Full qualified name of the portal service from parHi,
Web Dynpro applications can access portal services in one of the following ways:
● Directly: The application can get an instance of the service on the machine on which the Web Dynpro application is running.
● Via the Service Factory: The application can request an instance of the service from the service factory. The service factory provides a conduit to portal services to ensure that the proper service is called, even in cases when the Web Dynpro application and the portal are running on different machines.
Only services written in a remote-safe manner are available via the service factory. These services include the following portal services:
Page Service
Tray Service
Page Service
The page service provides information about the page in which the application is running, and enables you to perform the following tasks:
● Getting a list of the atomic names of the visible iViews in the page.
You may want to use this method to avoid updating the user interface of an iView when it is not visible.
IWDPageService pageService = (IWDPageService)
WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);
// String array receives iView names
String[] iViews = pageService.getVisibleIViews();
● Hiding/showing iViews in the page
IWDPageService pageService = (IWDPageService)
WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);
// display iView Search
pageService.showIView("Search");
// hide iView Details
pageService.hideIView("Details");
Changes to the visibility of iViews are not saved. When a user refreshes the page, the original settings are restored.
Tray Service
The tray service enables you to add a menu item to an iView or page tray, and to specify a Web Dynpro action to execute when the menu item is selected.
The following is an example of adding an iView and page menu item:
IWDTrayService trayService = (IWDTrayService)
WDPortalUtils.getService(WDPortalServiceType.TRAY_SERVICE);
if (trayService != null) {
// Add iView tray menu item
trayService.addIViewItem("addItemComment", "Add Comment",
wdThis.wdGetAddItemCommentAction(), null);
// Add page tray menu item
trayService.addPageItem("addItemComment", "Add Comment",
wdThis.wdGetAddItemCommentAction(), null);
Generally, tray menu items are added in the wdDoModifyView() method. Make sure to add the menu item once; otherwise, duplicate menu items are displayed.
Procedure
This section describes how to call a portal service.
For services whose interfaces are provided by Web Dynpro (such as IWDPageService and IWDTrayService), you do not need to perform Steps 1 and 2.
1. Make a sharing reference to the service, by doing the following:
a. Right-click the Web Dynpro development component or Web Dynpro project, and select Properties.
The Properties dialog box opens.
b. From the left pane, select Web Dynpro References.
c. In the Sharing references tab, add a reference to the portal service with the following format:
PORTAL:<Vendor name>/<Fully qualified name of the portal service application>
For example, the following shows a reference to the navigation service:
This graphic is explained in the accompanying text
2. To build the project, add the JAR file containing the service to the classpath of the project in the IDE.
Do not store the JAR file of the service in the libfolder of your development component or Eclipse project. This causes classloader problems at runtime.
3. Get an instance of the service.
To call a portal service directly, without the service factory, call WDPortalUtils.getServiceReference() with the key for the service, as in the following example:
IUserObjectBasedNavigation obnService = (IUserObjectBasedNavigation)
WDPortalUtils.getServiceReference(IUserObjectBasedNavigation.KEY);
To call a portal service via the service factory, call WDPortalUtils.getService() with the WDPortalServiceType constant for the service, as in the following example:
INavigationService navService = (INavigationService)
WDPortalUtils.getService(WDPortalServiceType.NAVIGATION)
If more than one Web Dynpro controller needs to use the same portal service, you can store the portal service reference in a controller context node. All other controllers that need to use the service must define a context node and map it to the context node with the service reference.
A portal service can be called only when the portal platform and the Web Dynpro application are running on the same machine.
It is recommended not to use your Web Dynpro-based portal content in a global or federated portal scenario.
Refer This Link for More Information:
[http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm]
I Hope This Information Might Be Helpful For you.
Regards,
Sharma. -
How to access Cotnet Services Webdav with anonymous?
How to access Cotnet Services Webdav with anonymous?
See the section entitled 'Enabling the Ability to Grant Public Access' inthe Content Services administrators guide. Once you have granted public access to a document you will not need to authenticate to access it.
regards,
-sancho -
Can anybody tell how to access web service from Message Driven bean
Can anybody tell how to access web service from Message Driven bean
Can anybody tell how to access web service from Message Driven bean
-
How to access search service api to get results in JSON format?
How to access search service api to get results in JSON format in asp.net web application outside SharePoint farm. It should be an app or SharePoint hosted.
I have tried the same with the help of "http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx".
function onQuerySuccess(data) {
var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
$("#resultsDiv").append('<table>');
$.each(results, function () {
$("#resultsDiv").append('<tr>');
$.each(this.Cells.results, function () {
$("#resultsDiv").append('<td>' + this.Value + '</td>');
$("#resultsDiv").append('</tr>');
$("#resultsDiv").append('</table>');
But we are getting data.d as undefined.
I have checked and verify that I am getting success and data in XML format not in JSON. As I expected the JSON. Although I have specified the "JSON" in headers " headers:
{ "Accept": "application/json;
odata=verbose" } ".
ThanksHi,
Per my understanding, you might want to access search service REST API and get results in JSON format using jQuery.
The code you use is working in a SharePoint Hosted App project, to compose a working code snippet easier, you can take the demo below for a try:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("ready");
function ready()
var spAppWebUrl = _spPageContextInfo.webAbsoluteUrl;
var queryUrl = spAppWebUrl + "/_api/search/query?querytext='book'";
$.ajax({
url: queryUrl,
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
console.log(data);
var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
$.each(results, function () {
$.each(this.Cells.results, function () {
console.log(this.Key+"--"+this.Value);
error: function (data) {
console.log(data);
</script>
Add the code into a page of your site, it will retrieve JSON format data and print the search result in the console of browser.
More information about how to work with SharePoint Hosted App:
https://msdn.microsoft.com/en-us/library/office/fp142379.aspx
If you want to call the search service REST API in a remote environment, authentication is required to be taken into consideration, the link below with a working demo
would be helpful:
https://pholpar.wordpress.com/2013/05/11/accessing-office-365-sharepoint-sites-using-rest-from-a-local-html-javascript-host/
Best regards
Patrick Liang
TechNet Community Support -
How to access Portal Logged in user in Web Service application
Hi Experts,
I have created one Deployable Proxy and based on that i have created Web Based (WAR) project. to consume the proxy i have created Servlet based java file which invokes Web services. Based on this WAR project i created EAR application which deploys on J2EE server.
I am facing issue while accessing Portal Logged in user in my Servlet Class in WAR project so can you please provide inputs for how we can access Portal Logged in user in our Servlet class? also how we can access LDAP detailes of portal Logged inuser ?
I tried to fetch the Logged in user from servlet request but i can't access it giving me null value. Following is the method details that i am using in my servlet.
protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException
IUser user = UMFactory.getAuthenticator().getLoggedInUser();
String strName = user.getFirstName();
If I checked in LDAP values First name for logged in user is present but in my code its giving Null value.
Can you please provide your inputs on above issue.
Regards,
Rahulhave you found a solution this problem yet?
-
How to Create Portal Service in Portal 7.3
Dear Experts,
how to create the Portal Service in Portal 7.3, as we create in Portal 7.0 by creating the Portal Project in that we create Portal Service and we can start and stop in Portal Service configuration in System Administration
Thanks,
Sagar PandeHi Sagar,
Procedure
1. Open the SAP NetWeaver Administrator by either of the following methods:
a. Use the URL to your AS Java (hostname:port) to access the AS Java home page and use the link to SAP NetWeaver Administrator.
b. Alternatively, add nwa to the AS Java URL to access SAP NetWeaver Administrator directly. (hostname:port/nwa).
2 Go to Operations Management Systems and click the Start & Stop link.
The Start & Stop: Java EE Instances window opens.
3 Click the Java EE Application bar and select the relevant application in the Application List.
The Portal Services pane displays the services associated with the selected application.
4 Use the buttons Start Service or Stop Service.
Refer to Portal 7.3 help
http://help.sap.com/saphelp_nw73/helpdata/en/f6/ac978061ac4b24a87a1f821313c4fe/frameset.htm
Br,
Venky -
Accessing Portal Service from web dynpro : NoClassDefFoundError
Hello Experts,
I tried to develop a portal service (EquiService) and a web dynpro application (wdequset) which accesses the portal service. I put my web dynpro in an IView to show it in the portal. The service is running but when I try to open the IView I always get an error. I debugged my web dynpro application and found out that I didnt get a reference to the service (portalEquiService is always null). See the following code and have a look to my comments.
public void wdDoInit()
//@@begin wdDoInit()
String key = IEquiService.KEY;
* Here I get the right key. Thats OK so far.
// IEquiService portalEquiService = (IEquiService)PortalRuntime.getRuntimeResources().getService(key);
* When I use this line to get an instance of the service, I get the following error:
* java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
* The package "com.sapportals.portal.prt.runtime.*" is imported
IEquiService portalEquiService = (IEquiService) WDPortalUtils.getServiceReference(key);
* I found this in the "How to Access a Portal Service Within a WebDynpro Java Application" document.
* When I use this line, I get the following error:
* java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
* The package "com.company.service.equi.IEquiService" is also imported.
wdContext.currentContextElement().setEquinummer(portalEquiService.getEquiData().getEquiNr());
//@@end
When I have a look to the service in the portal I see that the service is running and the following additional lines under Dependents:
service: psequinr|EquiService
SAPJ2EE::company.com/wdequset
So the service seems to know my web dynpro application (after debugging for the first time).
Detailed error information 1 (when I try to get the reference by PortalRuntime.getRuntimeResources().getService(key) ):
java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:107)
at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Detailed error information 2 (when I tryto get reference by WDPortalUtils.getServiceReference(key) ):
java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:123)
at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Hope that anybody knows what could be wrong here.
Thanks a lot.
ReneThe prtapi.jar is set in the classpath:
<classpathentry kind="lib" path="C:/Programme/SAP/JDT/eclipse/plugins/com.sap.tc.ap/comp/SAP_JTECHS/DCs/sap.com/epbc.prtapi._api/_comp/gen/default/public/default/lib/java/prtapi.jar"/>
and when I look in the portal (System Administration -> Support -> Portal Runtime -> Application Console), select my service and press the "show" Button, I see that the service has a dependency to my web dynpro application.
service: psequinr|EquiService
SAPJ2EE::company.com/wdequset
So I think that the sharing reference of the web Dynpro should be ok. Or not? -
How to access Portal Database ( ORACLE) through webdynpro java
Hello experts,
I want to <b>access portal database tables</b> ( WCR_USERSTAT,WCR_WEBCONTENTSTAT,WCR_USERFIRSTLOGON )<b> using</b> <b>webdynpro java</b> application/service . Our portal DB is Oracle , so please tail me some solution for this asap. I had tried using <u>Portal Activity Report</u> iViews but that no fulfill our requirment.
Regads,
Laxmi..Hi,
You can use the following link which will help you to resolve the problem:
/thread/100181 [original link is broken]
thanks & regards,
Manoj -
Access Portal Services within Web Dynpro
Hi,
I created a portal service and would like that some values of the same have to be set by a Web Dynpro application, but i have a problem to access this
service. Always that a i try to get a reference of this service the object isn't instantiated and i get a null instantiated.
What i`m trying to do is the broadcast message described in [/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1 |/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1]with a variation that need of some
more Attributes and that the same will be pass by the Web Dynpro, like the broadcast message i`ll just use the alert concept and don't the publication.
Follow below the describe of executed actions.
1 - I did all the process as the [Weblog|/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1].
2 - I generated the Jar and insert the same in a DC.
3 - I generated the Web Dynpro application, in the used DCs and added the DC with the Jar, and i inserted the reference in a Sharing References.
4 - Did the deploy and insert the Web Dynpro in a Portal Iview.
But always that i execute, i can't capture the reference of the service.
Note: The reference in Sharing References was executed for several diferents forms of test, like for exemple:
PORTAL:<vendor>/com.teste.broadcast
PORTAL:com.teste.broadcast
PORTAL:<vendor>/com.teste.broadcast.alertreceiver
PORTAL:com.teste.broadcast.alertreceiver
But always adding one at a time.
Until put the saller like sap.com i already try.
The creation of the service as described in the weblog can be accessed for a Web Dynpro? What the problem to access the Service??
The codes follow Bellow.
portalapp.xml
<?xml version="1.0" encoding="UTF-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.runtime.system.notification"/>
<property name="ServicesReference" value="com.teste.broadcast"/>
</application-config>
<services>
<service name="alertreceiver">
<service-config>
<property name="className" value="com.teste.broadcast.alertreceiver"/>
</service-config>
</service>
</services>
</application>
BroadcastAppView.java
import com.sap.security.api.IUser;
import com.sap.tc.webdynpro.clientserver.portal.WDPortalUtils;
import com.sap.tc.webdynpro.clientserver.portal.sf.WDPortalServiceType;
import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
import com.sapportals.portal.prt.service.notification.INotificationService;
import com.sapportals.portal.prt.service.notification.NotificationStringBufferPool;
import com.sapportals.portal.prt.service.notification.StreamData;
import com.sapportals.portal.prt.service.notification.TopicData;
import com.sapportals.portal.prt.service.notification.TopicDataContainer;
import com.teste.broadcast.Ialertreceiver;
public void onActionSendMessage(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionSendMessage(ServerEvent)
IWDMessageManager msgManager = wdComponentAPI.getMessageManager();
INotificationService notService = null;
try {
notService = (INotificationService)
WDPortalUtils.getServiceReference("com.teste.broadcast");
//notService = (INotificationService)
// WDPortalUtils.getServiceReference("com.teste.broadcast.alertreceiver");
//notService = (INotificationService)
// WDPortalUtils.getServiceReference(IAlertreceiver.KEY);
} catch (Exception ex) {
msgManager.reportWarning("2-" + ex.getMessage());
TopicDataContainer container = new TopicDataContainer(TOPIC_NAME);
StreamData messageStream = new StreamData(new ByteArrayInputStream(textMessage.getBytes()));
TopicData durationdata =
new TopicData(TopicDataContainer.STRING, "60");
TopicData userdata =
new TopicData(TopicDataContainer.STRING, user.getUniqueName());
container.addTopicData("message", messageStream);
container.addTopicData("duration", durationdata);
container.addTopicData("user", userdata);
container.addTopicData("group", "GROUP_ACCESS");
//notService.publish(TOPIC_NAME, container);
msgManager.reportWarning("-" + notService);
//@@end
* The following code section can be used for any Java code that is
* not to be visible to other controllers/views or that contains constructs
* currently not supported directly by Web Dynpro (such as inner classes or
* member variables etc.). </p>
* Note: The content of this section is in no way managed/controlled
* by the Web Dynpro Designtime or the Web Dynpro Runtime.
//@@begin others
private final static String SERVICE_NOTIFICATION = "com.sap.portal.runtime.system.notification.notification";
private final static String TOPIC_NAME = "USTBroadCastAlerts";
//@@end
Thank.
Luciano Feletti AponteHi Luciano,
Take a look at for your answer:
/thread/833576
Regards,
Rogério -
How to access portal activity report information in webdynpro
Hi All, I want to display portal activity report table in webdynpro screen, for which I am using following tables
WCR_USERSTAT,WCR_WEBCONTENTSTAT,WCR_USERFIRSTLOGON,WCR_USERPAGEUSAGE.How to fetch data from these table in webdynpro.?
Is there any alternative for accessing Portal Activity report to webdynpro screen.
Thanks & regards
PoonamHi,
http://help.sap.com/saphelp_nw2004s/helpdata/en/58/728ea01cf64fff996b827f2a06f9b1/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fb/144120ea5b4e9c9385d493a578d6c9/frameset.htm
*******please reward points if the information is helpful to you************* -
Accessing portal service from abstract portal component
Hi
I have created a portal service where it contains getdata() and putdata(String) methods.
I have created a abstract portal component and trying to access the portal service from this component.
In portalapp.xml file of the portal component i have created the sharing reference and i have given the service name.
When i run the component it says service not found.
Please let me know if i have missed some things
Thanks and Regards
NagaKishoreHi Prakash
Sorry for the latereply.
find below the code for the interface
package com.sap.global;
import com.sapportals.portal.prt.service.IService;
public interface IGlobalContext extends IService
public static final String KEY = "IGlobalContext.GlobalContext";
public void putData(String strUserID,String strSessionID);
public String getData();
portalapp.xml file of the portal service.
<application>
<application-config/>
<components/>
<services>
<service name="GlobalContext">
<service-config>
<property name="className" value="com.sap.global.GlobalContext"/>
<property name="startup" value="true"/>
</service-config>
<service-profile>
<property name="Test" value="true"/>
</service-profile>
</service>
</services>
</application>
I am doing the following steps to access the portal service in the abstract portal component.
1. Add the portal service to the java build path of the abstract portal component.
2. do content method has the following code.
String userid ="",sessionid="";
response.write("Welcome");
try
IUserContext uc= request.getUser();
userid = uc.getLogonUid();
sessionid = request.getServletRequest().getSession().toString();
response.write("Iview "+userid);
IGlobalContext uid = (IGlobalContext)PortalRuntime.getRuntimeResources().getService(IGlobalContext.KEY);
uid.putData(userid,sessionid);
response.write(" Response from Service " + uid.getData());
}catch (Exception e)
response.write(e.toString());
3. portalapp.xml of abstract portal component
<application>
<application-config>
<property name="SharingReference" value="GlobalContext"/>
</application-config>
<components>
<component name="LandingPageComponent">
<component-config>
<property name="ClassName" value="com.satyam.landing.LandingPage"/>
</component-config>
<component-profile/>
</component>
</components>
<services/>
</application>
I am getting the following error.
Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
Could not find portal application GlobalContext.
Exception id: 11:53_08/04/05_0095_1641450
See the details for the exception ID in the log file
Thanks in advance
Regards
NagaKishore -
Cannot access Portal Service from Web dynpro DC
Hi all,
I cannot access the portal service from my web dynpro dc.
1. I created a Portal Service (say xxxservice) in a DC (say the DC name is testservice and the vendor is xx.com)
2. Created a public part under the testservice DC and added my classes to it.
3. Built and deployed the testservice DC.
Now,
4. I created a web dynpro DC.
5. In the used DC section added the public part of the testservice DC and also the epbc.prtapi._api.jar for build time and runtime with strong qualifier.
6. In the web dynpro "Sharing Reference", I added PORTAL:xx.com/testservice
7. In the component controller, I am calling a method from the Portal Service.
8. Built the web dynpro DC and deployed it.
9. But at the run time it gives, NoClassDefFoundError on the xxxservice.
I looked at many forum threads and tried everything. For eg: changed the Sharing Reference to PORTAL:sap.com/testservice but nothing works.
Please do suggest me if I am missing something
ThanksHi Laxmi,
I am sure something wrong at Portal Service DC creation. On webdynpro part you done fine .. by putting PORTAL:sap.com/testservice
Check the below steps:
1. Create DC Portal Applicaiton Stand alone (SDA)
2. Add portal Service for the newly created portal service dc
3. build and activate
4. by default you should be get public part by name API which is compilation dependency
5. here you dont need to do anything else
6. on webdynpro just add the used dc to this API public part of portal service dc
7. add PORTAL:sap.com/testservice sharing reference
If u go by this you shouldnt get any error..
Now, u are saying something like ur own classes .. i think u are trying to put u r own classes to service.. but remeber portal service is to have only IYourService class and YourService class.. other classes should be made to be jar.. and add that jar to External library DC and create PPs compile & Assemble and add that DC to current service dc.
Hope it is clear.. if not pls let me know..
Thanks,
Raags -
How to access Portal URL outside of the LAN
Hi Experts,
Our J2EE engine is hosted on one machine and R/3 is installed on other machine (IP address is different). We have configured Web Dynpro ABAP iVIEW's and Transaction iViews in my portal. To be able to access these two iViews I have to maintain the IP addresses of both EP server and R/3 server IP's in every client host file.
Hence my client system is in LAN it is working with no issues, but we want to access the URL form out of LAN which is not possible at the moment.
Could anyone please advise me how to access the URL without maintaining the IP address in host file
and
able to access the URL out side of the LAN.
Thanks
MurthyHi Murthy,
Directly its not possible at all, For this you need to publish the Portal Server on Internet.
Once its published on internet then you can access the URL without maintaining the
IP address in host file.
In this your Basis Team and Network team will help you.
Regards,
Piyush
Maybe you are looking for
-
Help me, my all in one HP LaserJet Pro M1536 no longer makes copies and scans to pc
Hello, I have a problem with my multifunction. When I make a copy or when I scan to PC, both the ADF glass, leaving only the black lines on white with no picture, no nothing. If printing from Windows, rather well. What could it be? He abandoned the s
-
Forgot password for HP Envy from ipad to printer
Fogot password for ipad to connect to printer
-
After copying the audio from one project to another, there is only silence?
I am working in Adobe Premiere CS4. Because of an error with one of my projects, I wound up just copying all the video as well as the audio (which has a bunch of fadeouts/intricate splices) to another project. When I try to play the audio in the time
-
I have an iPhone 3gs, and I downloaded ios 5.1 through iTunes, but now its telling me to activate my iPhone with a sim card, and I never had one.. Help!
-
Please help me getting this query in MDX
Select CASE WHEN DSL.Latest_Label IS NULL THEN DS.[Label] ELSE DSL.Latest_Label END AS Label From Dim_Label AS DS LEFT OUTER JOIN (Select Idx,GRP_Idx,Max(Latest_Label) Latest_Label,MAX(Date_ID) Date_ID from [Dim_Label_Change] DSL te_Day = DSL.Date_Ef