Service Generator

Learn about the service generator tool.

The (CRUD) Services Generator is a web application which allows for generating CRUD Services. The web-based administration interface gives a rapid overview of all deployed services, the opportunity to test individual services as well as access to service generation functionality.

Service generator

The Custom Service page lists the currently configured Custom Services. With this page you can create, modify and delete services.

Creating a new CRUD service

To create a custom CRUD service, click on the "Create CRUD Service" button [1].

Generating a CRUD service (1)

Generating a CRUD service (2)

Then enter the Service Name, e.g. MyCompanyService.

The CRUD generator provides a couple of options to determine how the service should be created.

Option

Remark

Generate abstract types

This option indicates if abstract base class types are used in the generated service code. Some programming languages do not support the use of abstract data types. See chapter Conditions for further information on this topic.

Generate methods with credentials

This option indicates if additional CRUD methods should be created, which implement the CRM Login (user, password, language id) as additional parameter.

Generate simple conditions

This option indicates if conditions without recursions should be created.

REST support

This option indicates if an additional RESTful service endpoint should be created.

REST message format

The option allows for choosing the message format (automatic, XML, JSON). "Automatic" means, that the response format is identical to the format of the request.

Generate service namespaces

Some Clients cannot handle an empty target namespace attribute in the WSDL file.

With this option, a target namespace is generated.

CRUD service options

On the next page you can choose a business object (Info Area) [3]. If data type is left blank the data type has the same name as the Info Area.

Afterwards click "generate type" [4], then define the fields you want access with your service [5].

Generating a CRUD service (3)

Generating a CRUD service (4)

Clicking the check box in the header toggles on or off the selection for all fields. Selected fields can be given a custom name.

If required for your business needs add additional business objects (Info Areas), e.g. add the person info area as in our example below. Afterwards you can edit the links between the info areas [6].

Generating a CRUD service (5)

Data types may have many links to other data types, however if a data type is not defined in a service no links to that data type are possible. Via the "Show/hide disabled links" toggle button you can switch between displaying these disabled links and hiding them.

If no custom name for a link is specified a default link name is generated.

It is also possible to mark the link as optional; in this case the link record does not have to exist for the record to be created.

Generating a CRUD service (6)

Afterwards you have to define the methods of your service [7].

The service generator supports for different method types: Insert, Query, Update and Delete.

You can either generate the default methods [8] or generate custom methods. Each method name must be unique in the service. At least one method must be defined before moving on to the next step.

Generating a CRUD service (7)

After creating the methods an overview page is displayed [9], where you finally can create your service [10].

Generating a CRUD service (9)

Generating a CRUD service (10)

After creation of the service you can view the service definition and the WSDL via clicking the links in the overview page [11].

Creating a new query service

In order to create a Query Service click the "Create Query Service Button" [12].

The custom query service allows for execution of either a web query or a win query. Queries with parameters are supported, too. If a non-existing query is referenced the service is not created.

Query definition in web

Generating a query service

Note: Queries stored in web designer cannot be used by webservices.

Recreating Services

Under some circumstances it is unavoidable that CRM.webservices contain breaking changes and therefore it might be necessary to recreate the services. To make the process easier, it is possible to select multiple services and recreate them all at once.

Recreating services