cancel
Showing results for 
Search instead for 
Did you mean: 

SET_EXTENDED_XML_HANDLING use with server proxy

Former Member
0 Kudos

I looked at the help [Extended XML handling help|http://help.sap.com/saphelp_nw70/helpdata/EN/73/3f5c3c3906b006e10000000a11402f/frameset.htm]

The help extract in particular

Regardless of whether you set the parameter EXTENDED_XML_HANDLING at the sender or not, at the receiver, you can set the ABAP proxy runtime to complete the control table for fields. Call the method SET_EXTENDED_XML_HANDLING of the payload protocol and set the parameter EXTENDED_XML_HANDLING (to 'X'). The ABAP proxy runtime then determines when parsing messages to this proxy, whether the field was transferred to the message, whether the field contained an initial value, or whether it had no value at all. The proxy runtime correspondingly completes a control table that can be evaluated by the application.

The sample code is inside the proxy

data: l_bool type flag.
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 ).


 try.
lo_payload_protocol->set_extended_xml_handling(
     extended_xml_handling = 'X'
*    method                = method
*    message_direction     = message_direction
       ).
  catch cx_ai_system_fault .
 endtry.


l_bool = lo_payload_protocol->get_extended_xml_handling(
*    method                = method
*    message_direction     = message_direction
       ).

The controller table remains empty after call to set extended_xml_handling.

I was hoping to see entries in the controller for teh request values to know

which values where sent and which omitted and have default values.

The help suggests this is the way to do things.

But clearly there is a step missing.

How see values in INPUT-CONTROLLER where the field values are set according to the documentation

for in the server request (input) ?

regards

Phil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Phil,

I'm facing the same problem did you find a resolution for it?

Thanks,

Emile

Former Member
0 Kudos

The methods work,

I was just expecting too much from the extended handler in terms of nested structures.

Check at the element level

If you have a multi-element, then check each element.

Cheers

Former Member
0 Kudos

>

> The methods work,

> I was just expecting too much from the extended handler in terms of nested structures.

>

> Check at the element level

>

> If you have a multi-element, then check each element.

>

> Cheers

Hello Phil,

We are also trying to do the same? Can you suggest, what we need to do to get the Value XSI:NIL ?

Help.sap.com suggested the following.

[http://help.sap.com/saphelp_nw04/Helpdata/EN/73/3f5c3c3906b006e10000000a11402f/content.htm]

The ABAP proxy generation functions generate control tables of type PRXCTRLTAB (line type PRXCTRL) for each complex type. This component has the name CONTROLLER. Using this table you can define for each individual field whether it is to occur in the message, and how. For a table line, set the field FIELD to the ABAP field name, the field VALUE to a value from the type pool sai, and attach the line to the table. The field VALUE can have the following values:

Value Range for Field VALUE of Table CONTROLLER

Value Meaning

sai_ctrl_initia Field appears with type-correct initial value in the message; it controls default handling and performance optimization. Value is ignored for structures or complex types.

sai_ctrl_nil

The value xsi:nil is sent in the message for this field.

sai_ctrl_none

Field does not occur in message, independently of its value and the default.