Inbound and outbound services

Completed

The following sections describe the differences between inbound and outbound services.

Inbound service endpoints

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 the relevant data member attributes set. You can specify X++ data contract serialization and deserialization by using the DataContractAttribute and DataMemberAttribute attributes.

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

  • SOAP
  • JavaScript Object Notation (JSON)

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. Because X++ classes are consumed as JSON services, the return data set is in JSON format. You can use JSON to communicate data between the client and the server.

OData is a standard protocol for creating and consuming data, and it also:

  • Provides a protocol that is based on Representational State Transfer (REST) for create, read, update, and delete (CRUD) operations.
  • Applies web technologies such as HTTP and JavaScript Object Notation (JSON) to provide access to information from various programs.
  • Allows you to interact with data by using RESTful web services.

The public OData service endpoint enables access to data in a consistent manner across a broad range of clients. An OData REST endpoint exposes all data entities that are selected as IsPublic in the AOT in Visual Studio. The OData REST endpoint also supports CRUD functionality that you can use to insert and retrieve data from the system.

Finance and operations apps contain multiple APIs that support file-based integration scenarios:

  • Custom services
  • Office integrations
  • Recurring integrations
  • Data management package API

Recurring integrations API and the Data Management Framework API support file-based integration scenarios. The Data Management Framework (DMF) comes out of the box with finance and operations apps and supports data import and export. Recurring integrations also support data import and export scenarios.

When selecting an integration API, you will have many considerations. Some of the decision points for the DMF and recurring integrations can help you chose your implementation integration scenario.

For more information, see Implement the Data management package API for finance and operations apps.

Outbound calls

To make outbound calls, you can use business events, custom service calls from X++, or .NET class library, as you have done in Dynamics AX 2012. If you use X++ or .NET class library, you will no longer have the AIF helper classes.

With outbound calls, make sure that you consider the following points:

  • Secrets Management – You should use some type of tool to manage your keys and secrets.
    • Support for native encrypting/decrypting of columns is available.
    • Microsoft Azure Key Vault could be used to secure secrets; business events framework already uses Key Vault.
  • Keep settings configurable; avoid hard coding of values.
  • If you are exposing your old on-premises services to finance and operations apps in the cloud:
    • Setting up Network DMZ is one option.
    • Consider using Microsoft Entra application proxy / on-premises data gateway, which doesn’t require inbound connection.

For more information, see Consume external web services.