web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AIF Integration using Web Services

(0) ShareShare
ReportReport
Posted on by 575

Problem Description: Hi,

I am using using Web Services to integrate Microsoft Dynamics AX 2009 using AIF to a third party product written in VB.Net on .Net framework and SQL Server 2008.

I have hosted my services on IIS which is accessed by the developes using Visual Studio 2008 to work with the exposed functions. The hosted URL is http:\\host_name\MicrosoftDynamicsAXAif50\Service_name.

My question is:

1. If I create 10 sales order in Dynamics AX how will third party product will come know that 10 products has been created?
2. If they work the the product and say for example update the Order Status Column on AX Sales table how will AX know about it?

Please give me sample XPO files if you can and exmaple C# or VB.Net code.


Thanks

Neeraj

*This post is locked for comments

I have the same question (0)
  • user5555 Profile Picture
    7,437 on at

    Hi,

    I am integrating to download orders from my website.

    You need to decide how the information flow goes: push/pull and what type of technology you want to use or is present in the Third Party provider.

    1. You need to ask AX for it (push);
    2. AX needs to tell (push);

    AIF can push and pull. Webservices can only push since they are to be called on a remote (other server) location. AIF are also webservices but 'webservices' naming is just to get data from somebody else service.

    J.

  • Jeganeedhi Krishnan Profile Picture
    2,500 on at

    Neeraj,

         In my knowledge,

    You can scedule jobs(whether in Ax or.net) to call the webservices in a periodic interval.  This way you can achieve your requirement.

    If you give some more info then it will help to find answer for secound.

     

    Thanks

    Jeganeedhi

  • neeraj@bearingpoint Profile Picture
    575 on at

    Hi,

    In the case of sales, customer, purchase order being created in AX 2nd option is in my view much better i.e. Ax needs to tell/notify.

    But please do share your point of view as its just a proof of concept we are still not decided.

    Also supposing if AX needs to tell/notify. What is the best way to integrate third party product writh repect to AIF.

    Just use plain web services? or use adapters?

    In case if we use web services, how do we notify? or say implement option 2?

    Do you have any link on MSDN?

    Please share your experiance on this it wil be of great help.

     

    Thanks

     

    Neeraj

  • neeraj@bearingpoint Profile Picture
    575 on at

    Thanks, for your time and reply.

    Can you send me some pointers on MSDN ? or any other source which you can share where I can automate the polling process?

     have you ever implemented polling table in AX. I.e creating a separete table which keeps record/entry of any update, modify, insert, delete etc and expose it through web service based on which third party can write custum code and implement the logic?

     

    Is that a good design?

     

    Thanks

    Neeraj

  • user5555 Profile Picture
    7,437 on at

    Hi Neeraj,

    You need to make a functional design first if you have various people working on this project. You have to chose some design pattern and architecture. Also it is not wise to mix up code like C# and VB.NET. Prefer C# over VB.NET. There are various design patterns to have this job done. You need to expose your additional table (but why not put on top of the table you want to SyncState = enum {...} column for status and a column for the ModifiedSyncDate ?). Next you need to pack this into a class which you can put in a package. That package can then be scheduled in a job and query the SyncState. Of course your order logic should be changed to update this state....etc. you can work out best yourself. It might even be better to put a SyncState which is default so you do not need to change the posting logic of AX. So that saves your upgrades.

    Depending on how you will handle exceptions (the external party did not respond..?) you can make that the AIF (external party) tells your SyncState is is busy or finished etc. I have seen a post on a push mechanism for AIF. I did not look if that mechanism was also able to detect a non-responding third party tool. For that reason I would call a webservice on the third party instead and based on that status update AX. That is a more fail-safe scenario than just pushing out data and getting information back. But that depends on the architecture of the third party.

    J.

  • neeraj@bearingpoint Profile Picture
    575 on at

    Thanks Again for detailed reply.

    The secenario is for process industry. The third party solution is all written in VB.Net/SQL Server 2008 and they are comfortable using this(developers).

    Their product is going to do all the processing of data(back office) and AX will be the master for Sales, Customer, Order Creation etc. Their Product(VB.Net/Sql Server) will process after they recieve PruchaseOrder etc from AX.

     

    Now I guess Push based secenario as you mentioned in your previous reply whould be appropriate?

    Still I am wondering how to notify for the typical secenario which i have arealdy mentioned like

    1.If I create 10 Purchaseorder, how will my Vanilla Web Service given by default in AX will notify the

    third party product that they have to consume my service to get the data for 10 Purchase Order and

    process it. i.e How AX Pushes the data.
    2. If I create 10 Purchaseorder and if third party product is not there how to handel the error?By writing custom X++ code?

    My Background:
    Developer in Other appllications for last 8 years like Siebel, Oracle SOA Suit, Oracle Business

    Inteligence etc. Good exposure in .Net frameworks, programming, SQL etc. One month Expousre in AX 2009 with no formal traning.

    I will be responsible for AX side and they

    will be responsible for .Net side of the code.

    1. Our aim is to achieve a scalable solution independent of both products.

    I have done the following from my side.( I am repeating my self)
    1. Exposed AX Services via IIS for them to consume through webservices. By Adding service reference in

    the VS-Studio 2008 and then modifying there Vb.Net code to accomodate the functionality.
    For example: PurchaseOrder in AX.

    Still i have few questions on the way it will work and so do they(as both have very little exposure in AX

    2009)


    1. If they update the 10 Purchase Order for AX is there any typical seceniro I have to consider which you

    might have come across with repect to AX updates?

    2 I have never created a technical design document with repect to AX-AIF does microsoft has any

    documented best practice (I could not find any in there sure step for AIF)
    4. Is there standard design patterns for AX-AIF /Webservice-.Net Integration?

    Can you take some time in giving my a starting point in this case(Agile development methedology etc).
    Also is this the approach most appropriate and fast(i.e using AIF/Webservice).
    I have no exposure in other approach as well like MSMQ, File System, Biztalk. with repect to AIF.

    Apologies for any inconvinence if I may have caused by asking be too much.

    But any answer will be great help.

    Any code/document are also very much welcome.

    Thanks very much (for all the answers already you replied) and unfortunetly I am becoming bit greedy.

    :)

    Neeraj

  • user5555 Profile Picture
    7,437 on at

    Hi,

    I basically understand what you want. You want to achieve an interface between two systems and want to use webservices as a middle ware.

    What I do not understand is that you cannot layout the architecture of this. You have to design a failsafe scenario so that the data is transferred correctly from one system to the other and that in both systems know what the status of the transactions is: to-do, success or failed. I would monitor this process by reporting incidents or by having a check in the operational work of somebody. For instance the person entering purchase orders can see that previous purchase orders have been synchronized to the other system.

    If you choose the third-party to pull the data from the AIF then you need to define what data should be pulled and you need to define a webservice in AIF which contains that data, this AIF should collect the data based on some sync status and this sync status must be set by the third party after having received the data (so initially you have SynState = To-do, then the third party pulls out the data and processes it. On success if puts Syncstate = {success, failed}. On failed you can raise an error event and sent an email or so. Or the people entering the PO's will see only 'to-do' if the third-party does not respond.

    You can also have AX push the data to the third-party system. This has the benefit that you only need to do 1 call to the webservice of the third party. I would prefer this option. In particular if the other party has already a webservice for data input and no webservices for communication back the SyncState.

    More approaches can be done this way.

    If you do not mind: this has nothing to do with AX, but is just basic problem solving :-).

    J.

     

     

  • neeraj@bearingpoint Profile Picture
    575 on at

    Thanks and agreed with your approach.

    If I understood you correctly.

    This SynState is going to be the custom column on the base table for example SalesTable? Which I should populate with To-Do status.

     Then the third party when they call my service look for the to-do status column and then do read, update etc based on that and then finally update the status of SynState?

     Neeraj

  • Jeganeedhi Krishnan Profile Picture
    2,500 on at

    Thats good.

    I want to share my approach. It is mostly same what you people discussed.

    You want to pull your  data from ax to 3rd party system. So You create one new field in parameter( or custom table) also you update the status or increase the count in this field . Once it will reach count status 10 then you call 3rd party webservice(it can easily achieve through x++).

    In this 3 rd party service will call ax AIF webservice itself. So now data will transfer from ax to 3rd party through AIF webservices.

    If anything wrong in my understading or approach please ignore it. 

  • neeraj@bearingpoint Profile Picture
    575 on at

    Thanks Jenganeedhi, very much appriciated

    Can I ask another favour.

     Do you any example XPO file? or corresponding VB.Net or C# file for this? or both?

    Thanks

    Neeraj

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans