on 07-03-2005 8:28 PM
Hi there,
We have portal NW 04 SP 12.
i want to transfer some parameters from PDK iview to Wdp iview on the server With out using client side eventing.
When we used only PDK iviews, it was easy using session parameters (request.getsession).Can i do something like this between Webdynpro and PDK Iview?
I did not found a way to use session parameters in Wdp application.
Thanks & regards Nir
Hi Nir
1. Create a portal service to store the data using httpsession
2. From the PDK iview get the Http session and put the session in Portal service
3. Access this portal service in webdynpro and get the session stored in Portal service. Then you store the required data in the session
The above solution works only if your portal and webdynpro components are running on same box.
if you are running your portal and webdynpro components on different boxex then
1. Expose the portal service as a web service
2. Consume the webservice in Webdynpro
Let me know if you require any other info.
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore,
First thanks for the quick answer.
Can you please give me some more info describe your solution.
I already tried to use portal service.
The problem is my parameter must be unique per user &
session. What you mean by store the session in the portal service? I want to store the require data using pdk iview
& then load it in the Webdynpro application.
Just remember that the same user can use few sessions
at the same time.
Thanks Nir
Hi Nir
You have not mentioned whether your webdynpro component iviews and PDK iviews are running on same box or on different box.
1. When ever you access a webdynpro iview from portal, portal session id is also passed as a cookie. So,
In Portal service create methods as follows
1. HttpSession getPortalSession(sessionID)
2. void putPortalSession(sessionID,HttpSession).
In PDK iviews you have direct access to request object there by you can get the session info and place the required data. Apart from that put the session in the portal service using the put method.
From webdynpro component access the portal service and you get the session id as a cookie. Pass the session id as cookie to the get method and get the httpsession. There by you can retrieve the values stored in the session.
If it is in differnt runtime access the same thru webservice.
Let me know if you require any other information.
Kishore
Hi Nir
As i said when ever you call a web dynpro component session id is passed as a cookie. Here is the code.
HttpServletRequest req =((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();
Cookie[] cookies = req.getCookies();
for ( int i=0; i<cookies.length; i++) {
wdComponentAPI.getMessageManager().reportSuccess(cookies.getName());
wdComponentAPI.getMessageManager().reportSuccess(cookies.getValue());
}
Check for the Cookie JSESSIONID. This is required when you are running on different box. Since you said it is on the same box you can directly get the Http Session from the first two lines of code
Kishore
Actually, you might have the same session in your Web Dynpro application as within the Portal (since they're running on the same box) and thus you might be able to get access to the session using:
HttpSession session =((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest().getSession();
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.