2

when implementing a SAP Gateway Service (using DPC_EXT Classes), I'd like to access some custom cookies.

But I dont seem to be able to access them...

Using following code

lo_faqcade = /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lo_facade->get_request_header( ).

I get all the HTTP Request headers (Except the Cookie Header, which always seems to be empty here)

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
iPirat
  • 2,197
  • 1
  • 17
  • 30
  • If the data contained in the cookie was in the backend, I’d get it from there ;) – iPirat May 23 '18 at 05:15
  • 1
    PS: please don’t start the discussion why I a cookie is being used. A custom header is not an option either. The question is how to get hands on the cookie inside the request processing layer. – iPirat May 23 '18 at 05:20
  • not sure but did you see that 2 methods exists from facade class /IWBEP/CL_MGW_DP_FACADE? /IWBEP/IF_MGW_DP_FACADE~GET_REQUEST_HEADER (returns a list of all request headers of the current request) and /IWBEP/IF_MGW_DP_INT_FACADE~GET_REQUEST_HEADER (returns the request header of current service call) ... might "all request" headers solve your issue? – dotchuZ May 30 '18 at 09:52
  • I did try one of the two (see original post) but not sure which of the two interfaces is hidden behind the get_dp_facade call. Will certainly try that. Thx! – iPirat May 30 '18 at 10:06
  • did it help solving your issue? – dotchuZ Aug 15 '18 at 08:15
  • I didnt have a chance yet to try, as other things got prioritized. But this will be get to be a topic in very near future again. Will update here. – iPirat Aug 15 '18 at 08:23
  • Dumb question maybe ... but isn't it up to the _client_ to add the cookie to the request header? Is the client actually doing that? – Florian Nov 01 '18 at 23:33
  • @Florian the cookie is sent. But disappears somewhere between outer icf layer and the GW service implementation layer – iPirat Nov 02 '18 at 13:42
  • Checked today - BOTH methods return same table. The cookie line is in the list but is empty – iPirat Jan 22 '19 at 19:38

0 Answers0