cancel
Showing results for 
Search instead for 
Did you mean: 

SAP NetWeaver Gateway Create Deep Entity issue - Android

Former Member
0 Kudos

Hello,

I have an issue regarding the creation of a deep entity through a Gateway OData service. There is a header entity set and an item entity set and the associations are ok, I checked them multiple times, also the cardinality is ok. When trying to do a Post from the SAP Gateway system, everything is ok, the entity gets created (I receive a 201 response). Also, the entity gets created when trying to use the RESTClient from Mozilla Firefox.

The issue appears when using an Android device to do the posting. When using a device with Android 6.0, the entity gets created successfully, but when using a device with Android 4.1.1, with the same data for posting (both header and JSON body), the gateway system issues the following error message: Error while parsing an XML stream: 'BOM / charset detection failed'. I tried to debug and it seems that the error arises from class /IWCOR/CL_DS_EP_READER_JSON, method /IWCOR/IF_DS_EP_READER~READ_ENTITY, at the point where it reaches json_start, throwing finally a CX_SXML_PARSE_ERROR. I want to emphasize that on the device with Android 6.0, it passes this point successfully. Below is a screenshot from the class:

Below is the body of the request that I am using as a JSON request (it is similar in the Android application with the one that I use in SAP):

I continued the debugging process and found out that when the device with Android 4.1.1. is sendind the post request to SAP Mobile Platform, it does not send the body of the request (the payload is empty, as can be seen in the printscreen below from Wireshark installed on SMP).

It seems like it is a device problem, but I'm not sure if it has something to do with the Android version.

Could you please guide me on how to solve this issue?

Thank you in advance,

Stefan

Accepted Solutions (0)

Answers (0)