cancel
Showing results for 
Search instead for 
Did you mean: 

XML parsing Error while doing Deep Insert - JSON Payload

SandipAgarwalla
Active Contributor
0 Kudos

Dear All

We are currently having issues while doing a deep insert from SAPUI5 to Gateway. The Gateway server is 7.5

The error we get when we use the deep insert payload as json. it gives an error

{"lang":"it","value":"Error while parsing an XML stream"},"innererror":

The same deep insert work perfectly when we use the payload xml, by setting the request header as “application/xml”

I also checked the notes -

1751991 - OData Channel - Deep Insert in JSON Format Leads to Error

1874920 - Error in "deep insert" case when parsing JSON


But since we are using gateway 7.5, there notes are not applicable.

Are there corresponding notes for 7.5 version? We are using the version V2 of oDataModel from UI5 which uses JSON format by default.


Has anyone experienced the same issue?


Thanks

Sandip

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Sandip,

Can you share your payload here ?

Regards,

Ashwin

SandipAgarwalla
Active Contributor
0 Kudos

Hi

Here is the payload

Its in JSON format, and some properties values are blank.

Thanks

Sandip

mike_reader3
Active Participant
0 Kudos

Can you post the raw JSON, just want to see the format of it.

AshwinDutt
Active Contributor
0 Kudos

Hello Sandip,

Its difficult to view the screen shot of the JSON shared.

Could you please share the raw XML payload here ? so that we create a JSON one manually and check.

Regards,

Ashwin

SandipAgarwalla
Active Contributor
0 Kudos

Finally found the reason. One of the property in the backend was defined as Edm.Int32

And we were passing it as string. When we converted the string to integer by parseInt("2"), it started working with JSON payload. such a silly mistake.

Regards

Sandip

Answers (1)

Answers (1)

lynn_lin
Active Participant
0 Kudos

Hi Sandip,

Please check Error while parsing an XML stream | SCN

Regards,

Lynn