Implement custom services

Completed

You can develop custom services for finance and operations apps to expose X++ functionality to external clients. Existing code can be exposed as a custom service by adding an attribute to the code. The attribute is set on the data contract class and its members to automatically serialize and deserialize data that is sent and received across a network connection.

You can use custom service when the schema for the entity can be written as a simple data contract class with relevant data member attributes set. X++ data contract serialization and deserialization are specified by using the attributes DataContractAttribute and DataMemberAttribute.

When you write a custom service under a service group, the service group is always deployed on two endpoints:

  • SOAP endpoint
  • JavaScript Object Notation (JSON) endpoint

With a SOAP-based custom service, all service groups under the AOTService group node are automatically deployed, and services that are deployed must be part of a service group. X++ classes are consumed as JSON services, so the return data set is in JSON format. JSON is used to communicate data between the client and the server.