Me and my team works on complex projects which involves integration with AX / Oracle. While working on one of the project which involved AX integration where we had to develop a middle-ware piece to communicate between a custom eCommerce solution and AX. The medium we chose to integrate with AX was AIF.
We hosted inbound port in AX with http binding and configured the Sales Order & Customer Service classes to perform operations such as
- Creating Sales Order in AX
- Update sales order information in AX.
- Create & update customer information in AX.
- Create payment journals in AX.
It is critical to handle exception in integration, since you require a detailed report of what failed. Here we faced issues since AIF only provides the last level of exception, for e.g. in case if a sales order failed to be created in AX, it sends only the last error which is “Creation has been canceled”, however from the exception manager in AX you can get the complete details about the failure , but you will have to do guess work as well as, you will have to get throguh the document logs and history section to get the exact error message for your request.
While doing further analysis we found that AX provides a fault class “AifFault”. Whenever any aif operations fails AX sends a fault exception back to user, in the message section it gives the final error but further analyzing the same we found out that internally it also has one section “InfoLogMessageList”. Whoever has worked in AX knows about what is info-log so , i won’t go further with what is info log, but just to give a brief info-log stores all the events and warning when a certain activity is performed.
That’s it we got our solution to have a detailed error message. below is the example of how to get the detailed errors and warnings when performing any operations with AIF.
That’s about it :). Let me know if you found this article helpful into your coding.