Adapters

Microsoft Dynamics AX 2012 allows you to exchange messages using various transport protocols. This is enabled by the use of adapters. An adapter has an adapter type that determines if it can be used on an inbound port, an outbound port, or both. The standard adapter types that are used are send and receive, receive or send, and receive and respond. The naming of these types is rather confusing, but the following table shows how this translates to inbound or outbound ports:

Adapter name

Adapter type

Inbound

Outbound

Mode

NetTcp

Send and receive

Yes

No

Synchronous

HTTP

Send and receive

Yes

No

Synchronous

Windows Azure Service Bus

Receive and respond

Yes

No

Synchronous/Asynchronous

Filesystem adapter

Receive or send

Yes

Yes

Asynchronous

MSMQ

Receive or send

Yes

Yes

Asynchronous

Adapters also have an address property. This address is a URI that refers to the destination or source location of the port. Depending on the adapter, this is a URL, a filesystem path, or a message queue format name.

The NetTcp adapter

The NetTcp adapter is the only adapter that can be used on basic ports. On enhanced ports, the NetTcp adapter is only supported for inbound ports. This adapter type corresponds to the WCF NetTcpBinding and provides synchronous message exchanges by using WS-* standards over the TCP.

The NetTcp adapter is used for communication with other WCF applications hosted on an intranet.

The HTTP adapter

The HTTP adapter supports synchronous message exchanges over HTTP. When an integration port that uses this adapter is activated, a WCF routing service is deployed on IIS. This routing service routes all requests to the WCF services that are hosted on the AOS.

The HTTP adapter can be used for synchronous communication when the NetTcp adapter is not an option because of interoperability issues or because the services have to be available on the Internet.

The filesystem adapter

The filesystem adapter is used for the asynchronous exchange of messages using files that are stored on the filesystem. The exchange is asynchronous because it uses the AIF gateway queue to store both incoming and outgoing messages. A batch job is needed to process this queue. Files are then read from or written to a directory on the filesystem.

The filesystem adapter can be used when there is a need to import or export files. The filesystem adapter supports non-XML files by using transformations. This adapter can also be used to decrease the load on the system, improving performance. Instead of handling requests synchronously during working hours by using the NetTcp or HTTP adapter, messages can be processed asynchronously in batches during the nights or over the weekends.

The MSMQ adapter

The MSMQ adapter provides support for message queuing using MSMQ. This adapter is actually a WCF adapter that uses NetMsmqBinding. Like the filesystem adapter, this adapter exchanges messages asynchronously and can therefore be used to decrease the load during working hours.

The Windows Azure Service Bus adapter

A new addition to Microsoft Dynamics AX 2012 R2 CU7, Service Bus is a messaging service that is provided by the Windows Azure platform. It provides a secure way to create cloud applications that connect over public networks to Microsoft Dynamics AX. When a service is deployed using this adapter, it is exposed on IIS using the WCF routing service, as is the case with the HTTP adapter. This service then listens to Service Bus for messages sent by clients, forwards these messages to the services hosted on the AOS, and sends a response back to Service Bus. Security is provided by tokens that are handed out by an identity provider such as Active Directory Federation Services (AD FS).

Custom adapters

Having all of these features available, it's hard to imagine that you would need another adapter. When you do have a scenario that cannot be covered with the standard adapters, consider bringing Microsoft BizTalk Server into the picture. Among many other things, BizTalk can act as an intermediary between Microsoft Dynamics AX 2012 and an external application using any of the adapters that we just described. When this still doesn't fit your needs, you can always create your own adapter. You can do this by implementing the AIFIntegrationAdapter interface.

..................Content has been hidden....................

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