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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Web Service Interface Example

(0) ShareShare
ReportReport
Posted on by 804

Hello!

We are implementing ReTrans, a freight management logistics package with a JSON interface. The MS Docs reference this a bit in creating a service reference but fall short on usable examples.

Has anyone done this and would be willing to show or donate some example code, particularly in the X++ area?

Note this is AX 2012. 

Thanks

Konrad U

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    You do not consume it in AX directly. Common practice is to build c sharp dll that interacts with the service, here is one of the blogs with possible approaches https://www.codeproject.com/Articles/233698/Consuming-a-Json-WebService-from-a-Csharp-or-VB-Ap  and then use this DLL in AX. This way you handle all the complexity within c sharp code that has better tooling and expose to AX only simple methods that it needs. 

  • Suggested answer
    WillWU Profile Picture
    22,363 on at

    Hi Konrad,

    In AX2012, it is not possible to reference any Web service directly, you could consume web services from X++ code by adding Microsoft Visual Studio projects as a reference and by using Aif::CreateServiceClient.

    Have a look at Joris' Blog:

    daxmusings.codecrib.com/.../consuming-external-webservices-in-ax.html

  • Konrad U Profile Picture
    804 on at

    Thanks for the information! It is appreciated.

    Konrad

  • WillWU Profile Picture
    22,363 on at

    Hello Konrad,

    Glad to hear that, please spare a little time to verified the helpful answer to close this thread.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 527 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 473

#3
Adis Profile Picture

Adis 284 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans