LeaderBoard

Showing posts with label AIF. Show all posts
Showing posts with label AIF. Show all posts

Plan data import, export, and migration [AX 2012]

I think this topic is very useful with AX new Implementation and all points mentioned here should be taken into our consideration.

This topic describes the tools and strategies that you can use when you are planning to import or export Microsoft Dynamics AX data. The topic also describes how to plan to move data from one enterprise resource planning (ERP) system to another. Finally, the topic describes performance and security considerations when you import and export data. read more


How to Integrate AX 2012 with Other Applications

You can use the following methods to integrate Microsoft Dynamics AX with other applications:

1- Services and the Application Integration Framework

Services are the preferred option for integration with Microsoft Dynamics AX. Services in Microsoft Dynamics AX are used to expose its functionality through WCF-based services. Microsoft Dynamics AX code and external applications can consume Microsoft Dynamics AX services. AIF supports the processing of inbound and outbound messages such as message transforms and value lookups. Together, services and AIF provide the programming model, tools, and infrastructure support for XML-based integration with external applications and data

 2- .NET interop to X++

You can use the .NET interop to X++ feature to call X++ code using C# or another managed language. A proxy is an automatically generated .NET class, in C# or another managed language, that mimics an X++ class of Microsoft Dynamics AX.

3- .NET interop from X++

The .NET interop from X++ (also known as the CLR Interop in the previous release) provides interoperability with external .NET components and you can execute managed-code components from within X++ code. .NET interop from X++ is useful when you want your X++ code to access functionality provided by a CLR-managed assembly. This includes assemblies that are installed with the .NET Framework and any assemblies that you create with a language such as C# or Visual Basic.NET.

4- Consume external web services

You can use the Microsoft Dynamics AX programming model to consume external web services from within X++ code. To consume an external web service from X++, you must first create a reference to the web service. After creating a reference to the web service, you can invoke it from X++
and view the available methods with IntelliSense. Calling and managing external web services is done completely within Microsoft Dynamics AX.

The following figure shows how the AIF integration components interact with Microsoft Dynamics AX through the AOS.

image

WCF and AIF in Dynamics AX 2009

Imparted from here

AIF is a standards-based framework that allows you to publish and consume web services.  It’s used primarily in integration scenarios when connecting Dynamics AX with other systems.  AX also has .NET Business Connector (BC.NET) for integrating with .NET applications.  BC.NET is more for client side integration.  AIF is all about web services and is completely standards-based. Under the covers AIF takes full advantage of .NET using Windows Communication Foundation (WCF).  For more complex integration scenarios AIF can also help expose services using MSMQ and BizTalk.

With Dynamics AX 2009, the team ships a bunch of services (about 60 out of the box) that are ready for use.  That includes, for example, the more common scenarios like integration with sales orders or customers.  AIF allows you to create, read, update and delete those sales orders while maintaining the integrity of the database (i.e. without directly touching the database at all).  This is done independent of the transport so when developing you could begin by updating via http and later switch to MSMQ.  This can be as simple as enabling the service then “generating” which generates the WCF interface (i.e. WSDL).  That web service is then available to be consumed by any standards-based client (including apps written in php, java and naturally any of the languages in Visual Studio).  You can also configure the service endpoints to change the binding or authentication parameters.

In the video, Michael walks us through using a standard Excel Visual Studio Tools for Office (VSTO) project to consume a AX 2009 sales order service that is exposed using AIF.  He also shows us how, by using WS-Addressing in the WCF headers, you can pass a target company for a web service call. By default, AX limits error messages coming back from the server for security reasons.  Michael shows us how to configure AX to propagate those errors when you need to see them.

Dynamics AX is a rich platform for supply chain management and financials.  AIF opens up AX so that ISVs can build on that richness by integrating their own applications.  Sometimes when you do that you need to consume a web service exposed by external applications.  We see here how you can plug external web services into the AX processes.  In this case, Michael shows us how when trying to create a customer in Dynamics AX with a name that has been blacklisted by the US government (“Bin Laden”, for instance.  Yikes!  Smiley ) the customer create process calls out to an external web service in the cloud to verify the customer name.  This seamless integration of external processes is a boon for ISVs that need those deep integration points.  Michael explains how. In order to do this sort of integration you build a Service Reference in the Application Object Tree (AOT) to provide the parameters.  AX takes care of much of work by generating the artifacts (compilation, deploying, bundling etc) that are deployed and executed on the server.  CLR interop is available in order to use .NET DLLs and their classes.

Some code samples are available here: