Custom services

Custom services are programming models through which a developer can convert the X++ business logic to a service. Using this model, any existing X++ code can be exposed as a custom service simply by adding an attribute. There are standard attributes that can be set on the data contract class and methods to automatically serialize and deserialize data that is sent and received.

In Dynamics 365 for Finance and Operations, Enterprise edition, custom service programming model supports SOAP and JSON endpoints. Custom service model was available in the previous version--Dynamics AX 2012. The following are the key changes to custom services in Dynamics 365 for Finance and Operations, Enterprise edition from the previous version:

  1. Inbound port and outbound port no longer exist to manually deploy custom services, but you must add custom services to service groups that are automatically deployed.
  2. Custom services are always deployed on two endpoints; the following table shows endpoint URIs:

Type

Endpoint URI

SOAP endpoint

https://<host_uri>/soap/Services/<service_group_name>

JSON endpoint

https://<host_uri>/api/Services/<service_group_name>/<service_group_service_name>/<operation_name>

Most of the custom services available out of the box in Dynamics 365 for Finance and Operations, Enterprise edition are system services utilized for internal application processes or integration with various components, such as DIXF, retail, warehouse web application. There are various functional services available, for example, FormLetter services and financialDimensions services, which can be used for third-party integration scenarios.

The given bullet points summarize the custom services programming concepts in the Dynamics 365 for Finance and Operations, Enterprise edition application:

  • Custom services are based on the data contract defined by developers, and the service contract can be controlled
  • The existing business logic can be utilized and exposed as a service
  • Custom services are good for simple requirements, which are not otherwise easy to achieve using data entities
  • Custom services are best suited for an action triggered by third-party applications, such as PO receiving/posting and packing slips
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset