Quantcast
Channel: Vishy
Viewing all articles
Browse latest Browse all 27

Dynamics AX 2012 – AIF: Expose AX functionality as a webservice

$
0
0

There might be situations where you want to integrate third party applications with Dynamics AX, either to query for some data or to save some data into AX. The way to do this in AX is to write functionality in X++ classes and expose this functionality via Web services. The MSDN article below explains in detail one of these scenarios.

In short, follow these steps

  • Create an X++ class that would hold the data you want to return. Decorate the class and the methods with appropriate attributes to specify it as a contract.
  • Create another class that would basically list all the methods your webservice will have. Each of these methods will retrieve the data from AX and populate the entity class you created. Each of these methods need to also be decorated with an atttribute specifying that it is an entry point method.
  • Now create a service in the services node of AOT and specify the service operation class as the class that holds your operation methods.
  • Next create a service group for your webservice and drag and drop the service to this service group. Right click the service group and deploy the service. This will deploy it as a net/tcp service.
  • To expose as a http service. you need to create a new inbound port and specify http adapter. Then pick the operations that you want expose under this URL.

Reference msdn article: Walkthrough: Exposing an X++ Class as a Data Contract [AX 2012]



Viewing all articles
Browse latest Browse all 27

Trending Articles