This is the third in a series of eight articles reviewing my experiences with the Dynamics AX 4.0 Adapter for BizTalk Server 2006. This articles reviews the message context information that is required in order for Dynamics AX 4.0 to accept an inbound message.
The Dynamics AX 4.0 interface specification indicates that the actual inbound message that Dynamics AX 4.0 receives is an envelope, which contains a header and a body. The header of the message contains five attributes, as listed below. The body contains the actual contents of the message.
Header Attributes
– MessageId
– Action
– SourceEndPoint
– DestinationEndpoint
– DestinationEndpointUser
The Dynamics AX 4.0 adapter for BizTalk Server 2006 hides the envelope implementation from the BizTalk Server solution by exposing the five attributes listed above as promoted properties. When sending a message to Dynamics AX 4.0, the five context properties must be set. Dynamics AX 4.0 will reject a message where any of the five properties are not initialized. The list below shows the five properties and how each property should be set.
MessageId – GUID with surrounding swiggly brackets “{}”
Action – Name of the action as defined in the AIF (CreateCustomer, Create Order, etc)
SourceEndPoint – Name of the end point defined in AIF
DestinationEndpoint – Name of the destination end point as defined in AIF
DestinationEndpointUser – The fully qualified login that should be used to access the destination endpoint. Should be defined in the AIF. Usually the BizTalk Service account.
The context properties in the Dynamics AX 4.0 message may be set in one of three ways
1. By either assigning the context properties in the Message Assign shape in an orchestration, 2. By indirectly assigning the properties in a canonical messages that is associated with the Dynamics AX Property Schema and performing a mapping from the canonical format to the Dynamics AX 4.0 format within a send pipeline
3. By implementing a custom pipeline component to set and promote all five properties.
In my implementation, the actions, the SourceEndPoint, and the Destination EndPoint settings were stored in a custom section in the BizTalk Server configuration file. Other options includes storing the data in a database or in the SSO configuration store.