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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

HTTP Requests in Dynamics AX

(0) ShareShare
ReportReport
Posted on by 95

Hi all,

I need to integrate an external API with Dynamics AX. This API works as follows:

  1. Create HTTP request and send
  2. Catch the response, which will be XML
  3. Interpret the XML to pull the necessary data
Does anyone here know how to create HTTP requests and handle XML in Dynamics AX? I know using the business connector, I could create code in .NET, but I haven't done that before either. If that is the correct way, can someone please walk me through it?
Thanks in advance guys!

*This post is locked for comments

  • Martin Dráb Profile Picture
    240,930 Most Valuable Professional on at

    I have a nice example that I would like to publish this week, so if you can wait a while...

    If you can't wait, look at WebRequest class and XML-processing APIs - I used LINQ to XML. Using .NET APIs is really the most productive way.

  • dabonz413 Profile Picture
    95 on at

    Does this work in 2009?

  • Verified answer
    Martin Dráb Profile Picture
    240,930 Most Valuable Professional on at

    Sorry about the delay, nevertheless my post is finally available: Parsing XML files with .NET Interop. It's been written for AX2012 - you can use the same approach in AX2009 too, but you won't get such a seamless experience due to lack of managed proxies.

    It's not the only possible approach - you could use other .NET APIs or to load the remote file directly to XMLDocument instance in X++, for example. Simply use the most suitable technology for your particular task.

  • dabonz413 Profile Picture
    95 on at

    Great tutorial. Can I get a full source for the C# portion too though? I only saw the xpo file dowload.

  • Verified answer
    Martin Dráb Profile Picture
    240,930 Most Valuable Professional on at

    The C# project has been added to AOT and it's included in the .xpo. Unfortunately you can't get it easily if you don't have AX2012, so I've extracted the code to a separate class library for you (download). It's just to show the code, not to be built.

  • Suggested answer
    Dick Wenning Profile Picture
    8,705 Moderator on at
  • Ragoza Oleksandr Profile Picture
    737 on at

    is there any difference is sending httpS request  in comparison to http?

  • Martin Dráb Profile Picture
    240,930 Most Valuable Professional on at

    It's not very different. Look at this, for example: [View:https://stackoverflow.com/questions/2066489/how-can-you-add-a-certificate-to-webclient-c:750:50]

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans