Show/Hide Toolbars

TMS XData Documentation

Navigation: Service Operations

XData Service Wizard

Scroll Prev Top Next More

Easiest way to create service operations is by using the XData Service wizard.


From the Delphi IDE, choose File > New > Other...


From the dialog that appears, navigate to Delphi Projects > TMS Business and choose the wizard TMS XData Service.


That will launch the "New XData Service" dialog, which will provide you with the following options:


Service Name: Specifies the base name for the service contract interface and service implementation class, as well the unit names to be generated.


Generate interface and implementation in separated units: If checked, service contract interface and service implementation classes will be created in two different units. This makes it easy to reuse the interface for use in client applications using TXDataClient. This is true by default. If you are not going to use interfaces at client-side or if you simply prefer to put all code in a single unit, uncheck this option.


Add sample methods: If checked the wizard will add some sample methods (service operations) as an example.


Use a specific model: If checked, adds a Model attribute to the service contract/implementation with the name specified in the edit box.



After options are set, click Finish and the full source code with the service contract and service implementation will be generated for you.


If you prefer to create the source code manually, or simply want to learn more about the generated source code, refer to the following topics:


Service Operations Tutorial

Creating Service Contract

Service Implementation