Smartservice Result object with memtable

Home Forums kbmMW Smartservice Result object with memtable

Viewing 2 reply threads
  • Author
    • #53937


      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.

      Any suggestions how I can solve this problem?

      Thanks in advance!



    • #53938


      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.

      best regards


      • This reply was modified 6 months, 2 weeks ago by kimbomadsen.
    • #54043

      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

      Maybe this solution is usefull to others.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.