Home Business & Other Microsoft Dynamics AX 2012 R2 Services

Microsoft Dynamics AX 2012 R2 Services

By Saelen Kenny , Klaas Deforche
books-svg-icon Book
Subscription FREE
eBook + Subscription €14.99
eBook €36.99
Print + eBook €45.99
READ FOR FREE Free Trial for 7 days. €14.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
READ FOR FREE Free Trial for 7 days. €14.99 p/m after trial. Cancel Anytime! BUY NOW BUY NOW BUY NOW
Subscription FREE
eBook + Subscription €14.99
eBook €36.99
Print + eBook €45.99
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
  1. Free Chapter
    Getting Started with Microsoft Dynamics AX 2012 Services
About this book
Publication date:
March 2014
Publisher
Packt
Pages
264
ISBN
9781782176725

 

Chapter 1. Getting Started with Microsoft Dynamics AX 2012 Services

Microsoft Dynamics AX 2012 introduces a lot of new features that are related to the Application Integration Framework (AIF) and services in general. Many of the existing concepts have been radically changed. This chapter unveils these new features and enhancements made to the services in Microsoft Dynamics AX 2012.

At the end of this chapter, you will have a clear picture of what services mean in the context of Microsoft Dynamics AX 2012. This should enable you to identify where and when to use services in your solution and what type of service to use.

The following topics are covered in this chapter:

  • Introducing services and SOA: We will start by defining what services are and what SOA has to offer, and derive from that the scenarios in which they can be used.

  • Architecture overview: We will look at an overview of the services and AIF architecture and familiarize ourselves with the key components of the architecture.

  • New and enhanced features: We will discuss the new features and enhancements that have been made compared to Microsoft Dynamics AX 2009. This is also an opportunity to find out why some of these changes were made.

  • Types of services and comparison: There are several types of services available to choose from when implementing your solution. Therefore, it is important to be able to distinguish between these different types and choose the type that suits your needs best.

 

Introducing services and SOA


So what is a service? The best way to understand what a service is, is understanding why you would need a service. Typically, there are a lot of different applications being used in an enterprise. Sometimes this is by design; for example, because a specialized functionality is needed that is not implemented in the ERP system. In other cases, legacy systems are not replaced when implementing an ERP system, simply because they do their jobs well. Whatever the reasons, these or others, the result is the same: a growing number of different applications.

One of the problems with these applications is that they are likely to have been built using different technologies. Because they speak a different language, it makes them unable to communicate with each other. This is a problem that services address by providing a means by which applications can communicate, independent of their technology. They achieve this by adhering to standards and protocols so that, in essence, they start speaking the same language.

A service should have many of the same qualities as modern applications. Applications should be modular, components should be reusable, and everything should be loosely coupled. These principles also apply when developing services. Your services should have a well-defined functionality and should be able to autonomously execute that functionality without interaction with other services.

Services should also be abstract. By this we mean that other applications should not have to know the inner workings of the provider in order to use the service. This can be attained by hiding details such as how data is stored, what technologies are used, and how the business logic is implemented. Abstraction is not an end goal, but a way to achieve loose coupling and reusability.

A service is also self-describing, meaning it can provide other applications with metadata about itself. This metadata describes what operations can be used and what the input and output is. In the case of Microsoft Dynamics AX, this information is published using the Web Service Description Language (WSDL).

All of these qualities make services usable in a Service-Oriented Architecture (SOA). In an SOA, services are published and made discoverable. Services are then composed to create loosely coupled applications.

Example implementations

To make the previous explanation about services more concrete, we will take a look at three very different scenarios in which services can be used.

Bing API

Microsoft provides an API for Bing Maps and Search that is available to developers in various ways, including a web service. Developers can use this service for things such as calculating a route between two addresses, locating an address on a map, getting search results for a certain query, and so on. It's not hard to imagine this service being used in a logistics application; for example, to calculate the most efficient route for delivering goods to customers.

Mobile application

Let's look at a scenario where a mobile application has to be developed for Microsoft Dynamics AX 2012. Even if your mobile application contains business logic to work offline, data will have to be sent back to the Application Object Server (AOS) at some point. The mobile application could use services to execute business logic and send data to the AOS when a network is available. A mobile application can also be built without containing business logic, in a way that it only renders a Graphical User Interface (GUI). In this scenario, the application will have to stay connected to the AOS over the network because the AOS will drive the application and tell it what to do using services.

Business Process Modeling (BPM)

You can use services in an SOA to model business processes. When all requirements for the business processes are available as services, it is possible to compose processes entirely using services. When done right, this is very powerful because of the great flexibility that the combination of BPM and SOA provides.

 

Architectural overview


Depending on the requirements of your projects, a different architectural approach will be needed. To make the right decisions when designing your solutions, it is important to understand the services and AIF architecture.

Compared to Microsoft Dynamics AX 2009, there have been a lot of improvements made to the service architecture in Microsoft Dynamics AX 2012. The biggest improvement is the native Windows Communications Foundation (WCF) support. As a result, the proprietary Microsoft Message Queuing (MSMQ) and BizTalk adapters that were available in Microsoft Dynamics AX 2009 have been deprecated and replaced by adapters that use WCF. The MSMQ adapter in particular is replaced by an adapter that uses the WCF NetMsmq binding. The filesystem adapter remains intact and still allows you to import and export messages from and to the filesystem.

All services are WCF services and are hosted on the AOS. When an application wants to consume these services on the local network, no further deployment is needed because it can connect directly to the AOS. Just like with Microsoft Dynamics AX 2009, deployment on Internet Information Services (IIS) is needed for consumers that are not on the intranet. However, the services themselves are no longer deployed on IIS; instead, a WCF routing service on the IIS routes everything to the AOS.

If you want to modify messages before they are received or after they are sent, you can use pipelines and transformations. Pipelines only apply to the body of a message and are handled by the request preprocessor and response postprocessor. You can use transformations to transform a complete message, including the header. This allows you to exchange messages in a non-XML format.

The following diagram depicts the architecture as it is in Microsoft Dynamics AX 2012 and clearly shows the central role of WCF:

While not displayed in the diagram, there is now load balancing support for services using Windows Server Network Load Balancing (NLB). Combined with NLB for IIS, which was already available, this enables high availability and load balancing for services.

           
About the Authors
  • Saelen Kenny

    Kenny Saelen is a Dynamics AX MVP who works for the Belgian ICT company RealDolmen. He started as a developer on Microsoft Dynamics AX in 2004, primarily working on a European customer implementation with Dynamics AX 3.0. At RealDolmen, he gained experience with Dynamics AX 2009 while implementing AX internally, followed by an implementation at a book wholesale company. Currently, he is working as a technical architect for a worldwide customer implementation with Microsoft Dynamics AX 2012 R2, mainly working towards integrating Dynamics AX with other technologies such as SharePoint, BizTalk, and AgilePoint. He can be reached through his blog ksaelen.be.

    Browse publications by this author
  • Klaas Deforche

    Klaas Deforche started working as a developer on Microsoft Dynamics AX in 2007 for the Belgian ICT company RealDolmen, primarily working with Dynamics AX 4.0. He gained experience with AX 2009 while working on projects for some well-known Belgian fashion retailers, especially on the integration side of things. He is currently working on AX 2012 projects for customers in the healthcare sector. Klaas likes to share his knowledge with the community, which is why he started his AX-oriented blog artofcreation.be in 2009. This is also why, in 2012, Klaas co-authored the book Microsoft Dynamics AX 2012 Services, Packt Publishing, to help spread knowledge on the subject.

    Browse publications by this author
Latest Reviews (1 reviews total)
Terug een zeer goed boek, geschreven door insiders bij Microsoft Dynamics AX.
Microsoft Dynamics AX 2012 R2 Services
Unlock this book and the full library FREE for 7 days
Start now