cancel
Showing results for 
Search instead for 
Did you mean: 

Access/set dynamic configuration in client/server abap proxy

Former Member
0 Kudos

Hi,

I have 2 question regarding reading/setting dynamic configuration in ABAP proxies:

1) Is it possible to set dynamic configuration objects in a server abap proxy (SAP --> XI)?

When looking at the class CL_PROXY_FRAMEWORK is looks as if it is possible. This class has en attribute IF_XMS_MAIN~DY which is a reference to the class CL_XMS_MSGHDR30_DYNAMIC.

I'm not sure if I'm supposed to try and access the dynamic configuration objects via this class or if I'm supposed to use the GET_PROTOCOL method in some manner as suggested by:

http://help.sap.com/saphelp_nw04s/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm

Above link is for client proxies not server, and I've been unable to find any documentation on this for server proxies.

2) The same question goes for server proxies (XI --> SAP), though now I would like to set some dynamic configuration data.

This I believe should be done using get_protocol( if_wsprotocol=>ws_header ) as indicated by before mentioned link.

However in both cases I'm not sure of if it is indeed possible and which road to choose for sure. So a hint or 2 would be really nice.

Best Regards,

Daniel

ps. maybe I should just mention that I am pretty new to the ABAP world, so bear with me.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The link that you gave does give you an example for both server and client proxies:

Accessing Protocol Classes for Client Proxies

In client proxies, you access the protocol class by using the GET_PROTOCOL method. Below is an example for the IF_WSPROTOCOL_PAYLOAD protocol:

DATA:

lo_clientProxy TYPE REF TO co_clientProxy,

lo_payload_protocol TYPE REF TO if_wsprotocol_payload

lo_payload TYPE REF TO if_ws_payload.

CREATE OBJECT lo_clientProxy.

  • Get Protocol Class Using Method GET_PROTOCOL

lo_payload_protocol ?=

lo_clientProxy->get_protocol( if_wsprotocol=>payload ).

CALL METHOD lo_clientProxy->execute_synchronous

EXPORTING output = ls_request

IMPORTING input = ls_response.

  • Use Protocol Methods

lo_payload = lo_payload->get_sent_request_payload( ).

Accessing Protocol Classes for Server Proxies (XI Only)

Within the implementation of a server proxy, you get the protocol class by using the CL_PROXY_ACCESS=>GET_SERVER_CONTEXT( ) method:

DATA: lo_server_context TYPE REF TO if_ws_server_context,

lo_payload_protocol TYPE REF TO if_wsprotocol_payload.

lo_server_context = cl_proxy_access=>get_server_context( ).

lo_payload_protocol =

lo_server_context->get_protocol( if_wsprotocol=>payload ).