In my application I have a kbmMW+REST smartservice which returns an object that contains a kbmMemtable as a property. When I call this service as a REST service it works fine, but when I call this service as a kbmMW service the result seems to be nil all the time.
When I look at the transport log I see that “Data” is emtpy in the kbmMW call and UString in the REST Call.
The reason is that the receiving end (your Delphi client) do not know about the exact type TkbmMemTable.
The sending end also do not know about the exact type TkbmMemTable, but it does attempt to locate its parent types to find one that is known and can be used for marshalling. TkbmCustomMemTable is registered as a known type.
Your client only gets to know about what type of data it should unmarshal, by its qualified name (a string) ‘kbmMemTable.TkbmMemTable’. Hence in the current version it does not attempt (from the string) to locate a parent known type that can be used. I have however altered next release to support that.
To make your client work, you currently need to register TkbmMemTable as a known type before usage:
Then it should be able to handle the value.
This reply was modified 6 months, 2 weeks ago by kimbomadsen.
The main issue was that the fields where created dynamically . I now have to separate methods one for REST clients and one for kbmmw clients. I also have two different result objects. The REST result object still marshals the memtable (no issues with this) I have replaced the memtable for a stream in the kbmmw result object and added a property with a getter that loads the stream into a memtable. This way the memtable never gets marshalled