on 05-24-2005 11:00 AM
Hi there,
within our web dynpro we want to use a web service, which needs a LTPA-Token (a cookie) as authentication. This cookie is available through the HTTPRequest. However I can't find out how to forward this cookie to the web service.
Do you have an idea
Thanks a lot and regards
Stephan
Hi Stephan
Try this 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<i>.getName());
wdComponentAPI.getMessageManager().reportSuccess(cookies<i>.getValue());
}
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephan
Can you tell us where you are getting this cookie from. Moreover is your WebDynpro running within the portal.
If it is a URL parameter you can use the WDWebContextAdapter to get the values.
For reading cookies i dont think there is any standard WebDynpro API. You will have to read it using the Cookie class which is not a part of Webdynpro standard API.
Check this link on how to read a cookie.
http://help.sap.com/saphelp_nw04/helpdata/en/5b/ac1a0a8b8d6b4da3b79a7fe0aeabd8/frameset.htm
Hope that helps you.
regards
ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephan,
What is this LTPA-Token ticket? This ticket is coming from other application to your webdynpro application?
I suggest you to use SAP logon ticket. Using SAP logon ticket you can resolve your problem.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.