I have an object I'm sending from WEB Core to my XData service. It has a bunch of data fields, and one is an object that contains 8 strings. On the WEB Core side that's calling the interface, I added a test
if Assigned(obj_field) then ...
and it comes back TRUE. But on the XData side that receives the object, it's FALSE. The other data fields come across fine.
Debugging this code is a bit challenging, as all I get from the server is a non-specific 500 error return without looking for specific error conditions and throwing an appropriate exception. Assert doesn't even return anything specific. I had to insert a bunch of Logger statements to see what was happening on both sides. It didn't occur to me that the object wasn't being passed at all, so it took a while to track down.
I'm not sure if I'm doing something wrong or not, but it appears that the field containing the object is not getting serialized in the transfer to the service, so the resulting object's reference is NIL. (Sorry, I'm not quite sure how to see the serialized JSON that's being sent to the server.)
I seem to recall this topic of nested objects is discussed in the doc somewhere, but I'm having trouble finding it. Are nested objects supported? If so, is it possible there's a problem if you're using WEB Core as the client?
What can I do to dig into this further?
The obvious workaround is to replace the nested object by pulling the string fields out of the nested class and just put them into the outer class.
But the question remains: is this a known limitation, or a likely bug in the interface?