hi,
we are using code based odata client proxy -( rest service ) to send or receive data . i have defined the model class and set the response body structure for the HTTP operation. In the response handler class - /IWBEP/IF_CP_RESPONSE_HANDLER~HANDLE_REST_RESPONSE, it is unable to parse the response to the desired format and getting error /IWBEP/CM_CP-168: Instance of a complex type could not be deserialized. I have defined the response structure fields to be of type string and as nullable.
Response payload structure:
[
{
"status": 500,
"id" : null,
"externalId": null,
"message": "Some string"
}
]Some of the fields in the response structure are optional and they are ignored or sent as null by other REST API. Can you please guide what is wrong/missing and how to resolve the error.
Thanks
Request clarification before answering.
Hello @JyothirAditya_Kundhurthi
The JSON response does not match the proxy model
For nullable fields, ensure the proxy property is marked nullable. If null handling still fails, ask the REST API to omit null fields or send empty strings.
Then regenerate the OData client proxy/model and retest.
Thanks,
Sravan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.