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)

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

I have the same question (0)
  • Martin Dráb Profile Picture
    237,803 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
    237,803 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
    237,803 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
    735 on at

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

  • Martin Dráb Profile Picture
    237,803 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

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