cancel
Showing results for 
Search instead for 
Did you mean: 

Extended xml handling in asynchronous inbound (server) proxy

Former Member
0 Kudos

Hello,

I want to activate extended xml handling on an asynchronous inbound server proxy.

looking at online help:

http://help.sap.com/saphelp_nwpi71/helpdata/en/73/3f5c3c3906b006e10000000a11402f/frameset.htm

this should be the code:

lo_server_context = cl_proxy_access=>get_server_context( ).

lo_payload_protocol ?= lo_server_context->get_protocol( if_wsprotocol=>payload ).

CALL METHOD lo_payload_protocol->set_extended_xml_handling( abap_true ).

However the controller tables remain empty when executing a scenario to the application system.

Also adding a static attribute extended_xml_handling does not have the correct result.

any suggestions???

Regards,

Emile

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Emile,

do you have a solution regarding your problem? If not, here is a good one.

I think you have inserted the code inside the generated proxy method. Within this method it is a little bit tricky to get the controller structures filled. This could be done by parsing the input data once more... Here is an code example for this:

ls_input_data-name = 'INPUT'.
GET REFERENCE OF input INTO ls_input_data-value.

APPEND ls_input_data TO lt_input_data.

lo_server_context = cl_proxy_access=>get_server_context( ).
lo_payload_protocol ?= lo_server_context->get_protocol( if_wsprotocol=>payload ).
lo_payload_protocol->set_extended_xml_handling( extended_xml_handling = 'X' ).
lo_payload_handler = lo_payload_protocol->get_payload_handler( '<Name of structure data element>' ).

lo_payload_input = lo_payload_protocol->get_sent_request_payload( ).

lo_payload_handler->get_request_data_from_payload(
  EXPORTING
    payload = lo_payload_input
  CHANGING
    request_data = ls_input_data ).

But a much easier and better way is to insert the following coding within a constructor of the generated Proxy class.

lo_server_context = cl_proxy_access=>get_server_context( ).
lo_payload_protocol ?= lo_server_context->get_protocol( if_wsprotocol=>payload ).
lo_payload_protocol->set_extended_xml_handling( extended_xml_handling = 'X' ).

As in each standard ABAP class, you can insert your own constructor within proxy classes. If you do so and insert the code in it the controller table will be filled with the needed information.

Best Regards,

Lars