Add New WebService

From RAD Studio
Jump to: navigation, search

Go Up to File Menu

File > New > Other > Delphi Projects > WebServices > SOAP Server Interface

File > New > Other > C++Builder Projects > WebServices > SOAP Server Interface

Use this dialog box to define a new invokable interface and its implementation class. The dialog generates a new unit that declares an invokable interface and the implementation class. The interface descends from IInvokable, and the implementation class from TInvokableClass. It also generates the code to register the interface and implementation class with the invocation registry. After exiting the wizard, edit the generated interface and class definitions, adding in the properties and methods you want to expose as your Web Service.

Item Description

Service name

Enter the name of the invokable interface (port type) that your Web Service application exposes to clients. This name is used as the name of the interface. It is also used to generate the name of the implementation class. Thus, for example, if you enter MyWebService, the wizard generates the definition of an invokable interface named MyWebService, and an implementation class named TMyWebServiceImpl.

Unit identifier

Enter the name of the unit that the wizard should create to contain the interface and implementation class definitions.

Generate comments

Optional. Adds comments to the unit generated by the wizard, indicating what the code does.

Generate sample methods

Optional. Adds sample code, as comments, to the unit generated by the wizard. You can then use the sample code as a guideline for defining and implementing the invokable interface and implementation class.

Service activation model

Select the activation model you want from the drop-down list:

  • Per Request creates a new instance of your implementation class in response to each request it receives. That instance is freed after the request is handled.
  • Global Object creates a single instance of your implementation class, which is used to handle all requests.