cancel
Showing results for 
Search instead for 
Did you mean: 

Panic - WebContextAdapter is depracted - no more cookies now?

SybitMarco
Explorer
0 Kudos

We set up a new nwdi (with nw04s - whow whow whow).

Now i tried to checkin my old (nw04) webdynpros and got some erros.

I fixed all, except the problem with the cookies.

I have to access the cookies out the request to read the data client bag (EPCF client side eventing) that was filled by a SAP business package.

I tried to get the httpservletrequest with taskbinder and with all other possibilities that I found here. (e.g. WDWebContextAdapter).

But the new interfaces have no methods to access the httpservletrequest or the cookies directly.

Is this the end of cookie usage in webdynpro or have I overlook something?

How do you handle the new interfaces and request handling?

Thanks for any tipps or discussions.

Regards,

Marco

Accepted Solutions (0)

Answers (2)

Answers (2)

SybitMarco
Explorer
0 Kudos

As far I know, the cookie information can not be access any longer.

Former Member
0 Kudos

WDWebContextAdapter has been replaced by WDProtocolAdapter, that might be what you are looking for.

See <a href="https://media.sdn.sap.com/javadocs/NW04s/SPS7/wd/com/sap/tc/webdynpro/services/sal/adapter/api/WDProtocolAdapter.html">here</a>.

Armin

SybitMarco
Explorer
0 Kudos

Thank you for your hint.

I checked this before, but IWDProtocolAdapter returns with getResponseObject() an IWDResponse object.

With this object i can`t access the cookies, or can I?

Thanks,

Marco

Former Member
0 Kudos

I don't know. Have cookies ever been part of the Web Dynpro programming model or was it just a "hack"?

Armin

SybitMarco
Explorer
0 Kudos

I think there was a hack version with TaskBinder and an API code with WDContextAdapter where a httpservletrequest can be accessed. (second one is not sure )

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Marco,

I warned early enough: <a href="/people/bertram.ganz/blog/2005/02/02/never-ever-hijack-internal-web-dynpro-classes-and-interfaces">Never Ever Hijack Internal Web Dynpro Classes and Interfaces</a>.

Regards, Bertram

SybitMarco
Explorer
0 Kudos

Hello Bertram,

I read your blog before, but the cookies are used by the SAP Business Package therefore I am forced to read the cookies. (As far I now, there is no API to read the Client Data Bag in a WebDynPro)

Let me explain my szenario a little more detailed.

I have one portal page, there is a search iView. In this iView i will select one search result. After this all iViews on this page will be notified with client side eventing (subcribe and raiseEvent from EPCF).

Ok, in this case an object can be send with the event.

But now, I have further portal packages. iViews on this further pages can not be notified via client side eventing.

SAP stores the search result in the client data bag (a cookie). If I switch to the other portal pages my WebDynPros are searching for the Client Data Bag Cookies to get the search result and disply depended backend data.

How can this be done without cookies (mapping search results over multiple portal pages). I am grateful for any advise.

SybitMarco
Explorer
0 Kudos

Any news on this topic available? We still face this problem.

thx a lot,

Marco

Former Member
0 Kudos

Hi,

Although it seems that it is not possible to access cookies from Web Dynpro anymore, I've managed a workaround that works for me.

Using the SAP Application Integrator it is possible to create a service which is invoked before the Web Dynpro is called. From this service you can access the ServletRequest and thereby cookies and then pass information along to the Web Dynpro application as parameters. The solution is described in detail here:

Kind regards,

Rasmus Ørtoft