Posts

Showing posts with the label Delphi-XE4

Can someone help me with #DataSnap REST Application and callbacks?

Can someone help me with #DataSnap   REST Application and callbacks? I'm new to DataSnap. I'm going to create simple DS Server and web client with few buttons. I created new datasnap server (Datasnap REST Application) using wizard, modified web-pages, css, wrote my server methods. it works fine. Now I need to implement callback method on server, it should send some data to client. I can't understand how I can do that. I watched "Heavyweight Callbacks with DataSnap " by Methew DeLong  ( Heavyweight Callbacks with DataSnap - Part 2: Thin Client ) Seems it is very easy, but it uses "DS Server" wizard and executes callback method using ServerContainer1 variable (ServerContainer1.DSServer1.BroadcastMessage()). But in DS REST Application I have webModule instead of ServerContainer, and do not have references to TWebModule instances. So, the question is, how do I implement callbacks in DataSnap REST Application at server side (in #Delphi-XE4), or I should use ...