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 :
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,284 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,361 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,361 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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans