Deserializing a Service Document
Procedure
The deserialization of a service document (for example, on ATOM client side) can be done using this code fragment. The ABAP structure IF_APP_TYPES=>SERVICE_S gets filled from a REST entity object.
data:
lo_entity type if_rest_entity,
ls_service type if_app_types=>service_s,
lo_app_service_prov type ref to cl_app_service_prov.
...
create object lo_app_service_prov
exporting
io_entity = lo_entity.
lo_app_service_prov->get_service( importing es_service = ls_service ).
* process service document structure 'if_app_types=>service_s'
...