Hi there,
I'm getting an Error when i do a oModel.update() request against the Netweaver Gateway.
The following problem occurred: HTTP request failed500,Internal Server Error,{"error":{"code":"CX_SXML_PARSE_ERROR/001560AA0E081DEB8CA398CC1690D406","message":{"lang":"en","value":"Error while parsing an XML stream"}
It's no problem to read or create entities - everything works fine.
So for update with json I do a read on the specific entity.
In my onReadSuccess function i do the oModel.refreshSecurityToken() to get the X-CSRF-Token. (works, too)
Then I define the data which changes.
var oEntry = {};
oEntry.ID = id (dynamic);
oEntry.Name = name (dynamic);
var oParams = {};
oParams.fnSuccess = function() {alert("update successful"};
oParams.fnError = function() {alert("update failed"};
After that I do the oModel.update() in the oModel.read()-onReadSuccess function.
oModel.update(ServiceUrl, oEntry, oParams);
But here I'm getting error: error while parsing an XML stream
Does anybody know what to do? I read sth. about clearing the results & metadata but don't know how to do with JSON-Model.
Thank you very much
Greetz