Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Best Practice for callimg a php external webservice from AX 2012

(0) ShareShare
ReportReport
Posted on by 151

Hi Axians..

I would like to call some php webservices from x++ and get some data for intergration needs.

What are the best practices for it.

Thanks in advance.

  • Verified answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Best Practice for callimg a php external webservice from AX 2012

    What is "a php url"? When you call web services, you don't need to know which programming language the developer of the service used. And even if you know it, it's not relevant. You could develop identical web services with php, x++ or Java.

    What you need is documentation of the service, telling how to authenticate and how the request should look like.

    Anyway, here's one example of making a http GET call from x++: rahulmsdax.blogspot.com/.../rest-api-get-call-json-format-using.html

  • Mohammed Jabir OM Profile Picture
    151 on at
    RE: Best Practice for callimg a php external webservice from AX 2012

    It is a basic php url with get parameters.

    Now main and important question is that how to code calling webservice from x++ code

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Best Practice for callimg a php external webservice from AX 2012

    You need to start by getting the documentation of this web service, so that you can know how to call it.

  • Mohammed Jabir OM Profile Picture
    151 on at
    RE: Best Practice for callimg a php external webservice from AX 2012

    I need to collect data from an external webapp database.

    They will expose their php services to us and we need to give date as a parameter and get the records.

    I can put a batch job and collect the records periodically.

    So I need to call a php webservice inside AX

    If i mention specifically,

    These are then used in item competitor pricing tables of AX.

  • Hiroki Kanemaru Profile Picture
    on at
    RE: Best Practice for callimg a php external webservice from AX 2012

    Hi

    I would suggest that you provide more specific scenario so that other community can discuss best practices or alternatives.

  • Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Best Practice for callimg a php external webservice from AX 2012

    I wonder if you didn't want to ask how to make such a call at all, rather than talking about best practices.

    AX doesn't care which language was used to implement the web service.

    An important best practice is keeping DB transactions short, therefore you shouldn't make web service calls from inside transactions. Web service calls can take a lot of time or fail completely because of network issues.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,120 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans