What's new: Services and Application Integration Framework
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
This topic describes the enhancements to services and Microsoft Dynamics AX Application Integration Framework (AIF) in Microsoft Dynamics AX 2012. Services now provide a first-class programming model for integration and enable the Microsoft Dynamics AX application to expose its functionality through services that are based on Windows Communication Foundation (WCF).
New functionality
AX 2012 introduces integration ports for streamlined configuration of services. AX 2012 also provides significant improvements in the programming model, deployment, and administration.
In this topic New features in Cumulative Update 6 for Microsoft Dynamics AX 2012
New features in Microsoft Dynamics AX 2012 R2
New features in Microsoft Dynamics AX 2012
|
New features in cumulative update 6 for Microsoft Dynamics AX 2012
The following features have been added in cumulative update 6.
Support for deploying Microsoft Dynamics AX services to the Windows Azure Service Bus
In cumulative update 6, you can publish services to the Service Bus. The Service Bus adapter enables integration between AX 2012 and cloud computing platforms. You can develop mobile, cloud-based, and enterprise applications that communicate securely with AX 2012 over the Internet or through external networks by using the Service Bus adapter. The Service Bus acts as a message relay by enabling messages from the Internet to reach Microsoft Dynamics AX service endpoints on a private enterprise network and enabling responses from the private network to reach the intended client over the Internet.
For information about how to configure AX 2012 to publish services by using the Service Bus adapter, see the blog post Microsoft Dynamics AX Services and Windows Azure Service Bus.
Support for creating mobile applications
Mobile applications let you perform a wide variety of business processes, such as submitting expense reports and timesheets, from anywhere. For a walkthrough of a sample app for employee expense capture, see Developing secure mobile apps for Microsoft Dynamics AX 2012.
New features in Microsoft Dynamics AX 2012 R2
The following features have been added in AX 2012 R2.
Support for data partitions
An AX 2012 R2 installation might consist of multiple data partitions. The administration of AIF remains centralized. System administrators can view and modify service documents for all partitions.
AIF provides the following features that are related to data partitions:
Administration forms, such as Queue manager, History, and Exceptions, let system administrators view the status of the service operation infrastructure for all partitions. Each entry includes a Partition key field that identifies the related partition.
The Inbound ports form lets system administrators restrict an enhanced port to a specified partition.
The new data partitioning feature affects the way that data is accessed by service operations in Microsoft Dynamics AX. Each service request must contain information that identifies a specific partition. If you do not specify a partition in the call context or message header XML, AIF uses the default partition for the calling user.
The call context, the schema for the message header, and the administration form for inbound ports have been changed so that you can now restrict service requests to a specific partition. For more information, see Using the Call Context and Message Header.
For more information about data partitioning, see the following topics:
WCF configuration
The Inbound ports form includes a new button that lets you configure WCF settings for specific integration adapters. For more information, see Configure addresses for enhanced integration ports and Puertos de entrada AIF (formulario).
Additions to standard document services
You can now use services to import various types of transactions, import bank statements, maintain budget plans, import earnings statements from external systems, and forecast warehouse workload capacity and space utilization. You can also read, create, and update worker information in the Human resources module by using external systems.
The following services are new in AX 2012 R2:
Advanced ledger entry
Bank statement
Budget plan
Customer collection letters for Norway
Payroll earnings import
Worker import
Warehouse space utilization forecast
Warehouse workload capacity forecast
For more information, see Standard Document Services.
Support for optional replacement fields for a surrogate foreign key
In AX 2012 R2, AIF supports optional replacement fields for a surrogate foreign key that has multiple replacement fields. In other words, a replacement field is optional if the referring surrogate foreign key field is specified as non-mandatory on the table.
In earlier versions of Microsoft Dynamics AX, AIF treated all surrogate foreign key replacement fields as mandatory. Therefore, for outbound transfers, earlier versions of Microsoft Dynamics AX serialized each field when Axd documents were sent. However, in external clients that were written to use outbound document services in earlier versions of Microsoft Dynamics AX, fields that were previously mandatory are now optional and can be missing from the XML message.
New features in AX 2012
The following features have been added or changed in AX 2012.
Framework changes in AX 2012
This section describes new features and enhancements that were made to the framework in AX 2012.
WCF adapters
This release of Microsoft Dynamics AX provides expanded support for WCF beyond the basic HTTP and HTTPS bindings. The proprietary Microsoft Message Queuing (MSMQ) and Microsoft BizTalk Server adapters that were used in the earlier releases of Microsoft Dynamics AX are no longer available. Instead, AX 2012 provides equivalent native WCF functionality. However, custom adapters that customers and partners developed by using the AIF adapter framework are still supported in this release.
Services are hosted on Application Object Server
Microsoft Dynamics AX Application Object Server (AOS) is the WCF service host for AX 2012 services that are exposed to users and applications on an intranet. To consume services over the Internet, you must host services on Internet Information Services (IIS).
For more information about services, see Services, service operations, and service groups.
IIS services are hosted without .NET Business Connector
In the previous release of Microsoft Dynamics AX, services that were hosted on IIS required .NET Business Connector to communicate with AOS. In AX 2012, IIS-hosted services use the WCF routing service instead of .NET Business Connector.
For more information about services, see Services, service operations, and service groups.
Integration ports
In AX 2012, integration ports provide simplified administration of services and AIF. The concept of integration ports replaces AIF endpoints and related concepts that were used in earlier releases of Microsoft Dynamics AX. Each integration port can expose one or more services, and each integration port has a unique Uniform Resource Identifier (URI) that identifies the address of the port.
For more information about the concept of integration ports, see Integration ports.
Batched messaging
In AX 2012, you can submit large amounts of data by using the batch XML schema. This schema lets you group single messages into message sets that can be submitted together by using a single XML document. For more information about batched messaging, see Processing batched messages in AIF.
Change tracking
In AX 2012, you can configure the database to track changes that occur at the table level. You can then use the getChangedKeys service operation to retrieve entity keys for only those documents that have changed, based on specific criteria, such as the date and time. For more information about how to configure change tracking, see Configuring AIF for change tracking.
Performance improvements in services and AIF
The following list describes enhancements to services and AIF that improve performance:
To achieve scale and redundancy, you can configure AOS servers to use Network Load Balancing (NLB) for Microsoft Dynamics AX services. The AOS clustering solution affects only the RPC-based connections and does not let you load balance Microsoft Dynamics AX services. For more information, see Configuring network load balancing for services.
Client applications can access services via the WCF runtime, without using .NET Business Connector. .NET Business Connector was required for services and AIF in earlier releases of Microsoft Dynamics AX.
A deployment on an intranet does not require IIS, because services are now hosted on AOS by default.
You can host services on IIS for requests that originate from the Internet. However, the routing service on IIS dispatches these requests to the AOS host. All service requests, regardless of origin, are processed on AOS.
The services framework uses connection pooling to reduce the overhead of creating and destroying a session on service calls.
All the service references are placed in a single Web Services Description Language (WSDL) file. The single WSDL file lets developers reuse types when Microsoft Dynamics AX services are consumed.
Installation of services and AIF
To expose services on the Internet by using the HTTP protocol, you must install the Web services on IIS feature. For more information, see Install web services on IIS.
The Initialization checklist helps you set up AIF. In this single initialization step, you register services, adapters, and basic ports.
Upgrade considerations
In AX 2012, enhancements to the services framework significantly change functionality, configurations, database schemas, and document schemas (XSDs). When you plan an upgrade from earlier releases of Microsoft Dynamics AX, consider the following points:
You must recompile and test all applications that used the earlier release of Microsoft Dynamics AX to make sure that the applications work with services in AX 2012.
AX 2012 replaces the proprietary MSMQ and BizTalk Server adapters with equivalent functionality that is available in WCF. You must reconfigure and then recompile any automated integration processes that used these adapters, such as the BizTalk Server orchestration.
The upgrade framework creates partially configured integration ports that are based on existing endpoints. Newly created integration ports contain data policies and service operations, but you must provide address information and activate the ports. After you successfully complete the upgrade, you must configure the integration ports before you use AX 2012 services and AIF functionality.
For information about how to upgrade from earlier releases of Microsoft Dynamics AX, see the Upgrade Guide.
Deploying services on a web farm
Use the IIS Web Deployment Tool to manage multiple sites and web farm scenarios. Download the tool from the Web Deploy page.
Security changes
AX 2012 offers a robust and flexible security framework. Users are granted access to Microsoft Dynamics AX based on their assigned role. For more information, see Services and AIF security and protection.
Services and AIF rely on WCF for additional security. You can change the WCF configuration to configure the security settings that are required by Microsoft Dynamics AX services. WCF is responsible for authenticating the user. Service-level authorization is defined by the configuration of the integration ports.
Administration changes
The following table describes the changes to the functionality and configuration of services and AIF in AX 2012 that affect system administrators.
Microsoft Dynamics AX 2009 functionality |
AX 2012 functionality |
Description |
---|---|---|
Configuration is company specific. |
Configuration is not company specific. |
In earlier releases, each AIF endpoint was associated with a specific company. AX 2012 does not require that you associate integration ports with a specific company. You can use the integration port functionality to restrict service calls to a specific company. For an inbound message, the services framework obtains the company ID from the message header. If the message header does not contain a company ID, AIF uses the default company for the submitting user. |
AIF endpoint |
Integration port |
The concept of integration ports replaces AIF endpoints and AIF configuration forms. |
Data policies are mandatory. |
Data policies are optional. |
In earlier releases of Microsoft Dynamics AX, you had to manually assign data policies for each endpoint action policy. In AX 2012, configuration of data policies is optional. The default data policy is defined by the service schema that is defined by the service developer. You can use integration ports to enforce data policies. |
Improvements in services and AIF development
This feature has changed considerably since AX 2009. Many new capabilities have been added to support application development and integration with Microsoft Dynamics AX through services.
New features have been added that enable X++ business logic to be exposed as services, and that enable X++ to consume services. In addition to programming model changes, AIF has been updated so that developers can create transformations of non-XML data. AIF system services now let you retrieve information about users or metadata, and also run queries.
The following list contains a summary of the new feature areas for developers:
Services Enhancements
Service Groups
Support for Data Model Changes
SysOperation Framework
Support for Non-XML Files
SOAP Headers
Consume External Services in X++
System Services
Support for New Document Service Operations GetKeys and GetChangedKeys
Services enhancements
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
X++ business logic can easily be exposed as a service. |
X++ classes could be exposed as a service only if they implemented a service interface. |
X++ classes and members can be exposed as services and service operations by using attributes. |
You can easily expose X++ business logic to external systems as a service. Therefore, existing X++ code investments can be reused. |
|
Services support data contracts of any type. |
Only classes that implemented the AifSerializable interface could be used as service data contracts. |
Any .NET or X++ native type, such as str or int, can be used as a data contract. Any class that uses the AIF data contract attributes can be used as a data contract. |
You can more easily develop services, because you can use all native types and complex types as data contracts. |
|
Support for X++ types in data contracts |
The feature was not available. |
Data contracts can now use X++ container types and strongly typed X++ collections, such as Set or Array. |
Because complex X++ types are supported, more complex data scenarios can be supported in services. |
Service groups
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
The capability to group services by using service groups was added to the Microsoft Dynamics AX Application Object Tree (AOT). |
Services were managed at the individual service level. |
A service group is a collection of services that are frequently consumed and managed together. All services in a service group are published in a single WSDL file. |
You just have to add a reference to a single WSDL file to gain access to the service proxies for all the services in that service group. Service groups enable type sharing for simple types that are common across various services in a service group. For example, if two services in a service group take a parameter that is an enum or an extended data type (EDT), the parameter is shared and can be seamlessly passed between the two services. However, complex types, such as Address, are not shared. |
Support for data model changes
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
Extensive data model changes are supported by AIF. |
The feature was not available. |
The document services framework supports the data model changes that are implemented in AX 2012. The document services framework handles the following scenarios to produce a usable data contract schema:
|
AIF fully supports data model features. Therefore, data contracts are easier to use. |
What's New: AOS and Database for Developers in Microsoft Dynamics AX 2012 |
SysOperation Framework
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
SysOperation Framework replaces the RunBase framework. |
Only the RunBase framework was available. The user interface, business logic code, and data contract code were all contained in a single class. |
SysOperation framework classes separate the user interface, business logic, and data contract logic. |
You can use SysOperation framework classes to write applications that have reduced client to server communication. The user interface for input parameters can be auto-generated. |
Support for non-XML files
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
AIF supports the import and export of data in non-XML formats. |
The feature was not available. |
Data that is not XML, such as a comma-delimited file, can now be imported into and exported from Microsoft Dynamics AX. Developers can create custom transformations that transform non-XML data into a format that can be consumed by AIF. Custom transformations can be implemented by using an XSLT or a .NET DLL that implements the ITransform interface. |
AIF can work with non-XML data, and you can handle all data transformations in Microsoft Dynamics AX. |
SOAP headers
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
You can pass data into a service by using the SOAP header. |
Developers had to manually add custom code for SOAP headers. |
SOAP headers have been extended. There is now a strongly typed parameter that is part of the service contract. You can add SOAP headers when you call a service to pass additional data into the service. The following SOAP headers are supported:
|
Extended SOAP headers let developers provide more contextual information to a service when the client calls that service. |
Consuming external services in X++
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
Consume external web services from X++ without adding a service reference in the AOT. |
You could consume an external web service from X++, but you first had to add a service reference in the AOT. External services could be consumed only in limited scenarios. For example, server authentication was not supported. |
The Service References node has been removed from the AOT. You add a service reference in a .NET project and then add that project to the model store. Then you can access the external service from X++ code. |
There is now full support for web services that have complex schemas, and also support for web service authentication. Because of the comprehensive deployment functionality in Microsoft Visual Studio, your service references are automatically deployed when you configure them for automatic deployment. |
System services
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
Use system services to interact with and retrieve Microsoft Dynamics AX information. |
The feature was not available. |
System services are WCF services that are included with Microsoft Dynamics AX. The system services include the following services:
|
The system services open up Microsoft Dynamics AX development to other platforms by letting you retrieve system information via services. System services make it easier to develop applications that work with Microsoft Dynamics AX. |
Support for new document service operations GetKeys and GetChangedKeys
What can you do? |
AX 2009 |
AX 2012 |
Why is this important? |
Where can I find more information? |
---|---|---|---|---|
You can implement change tracking by retrieving entity keys for only those records that match certain criteria, and that have changed since a specified date and time. |
The feature was not available. |
The following two new service operations are supported:
|
Change tracking is supported for data exchanges. Because a list of entity keys is retrieved for only those records that have changed since the last update, performance is improved when you update data external to Microsoft Dynamics AX. |
Improvements in troubleshooting
In AX 2009, troubleshooting and logging of AIF were performed at the service operation level. In AX 2012, troubleshooting and logging are performed at the integration port level.
AX 2012 supports the correlation of exceptions to messages and ports. In other words, you can view information about the related port, message, and message set in the Exceptions form. For more information, see Configure troubleshooting options for integration ports and Monitoring services and AIF.
More information
For more detailed information about services, see the white papers Services in Microsoft Dynamics AX 2012 and Consuming Web Services, and the topic Services and Application Integration Framework (AIF).
For more information about how to use the services programming model together with AX 2012, see Selecting the Best Development Technology for Your Application Development Scenario (White paper).