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, ...
Answered

How to consume a Web Service from X++

(0) ShareShare
ReportReport
Posted on by

Hi community,

I connected WSDL service to AX2009. The description I found here: docs.microsoft.com/.../cc604242(v=ax.50)
In the example link above is used "WindowsLiveSearch". I didn't find a description of this component. How to consume WSDL from X++?

I have the same question (0)
  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    Didn't you miss the first paragraph of the article? ("The first step to consuming an external Web service is to add a reference to the Web service...")

    By the way, WSDL is a language describing web services. You can use this description to generate client code for web service consumption (this is what adding a reference will do), but WSDL isn't the actual service that you'll call.

  • Community Member Profile Picture
    on at

    Hello Martin, I a newer on web development. Thank you for correcting me. I have already done the first step and connect external Web service via reference.  I'm using a SOAP protocol to exchange.  Also I found the way to call methods. Now  I'm trying to initialise instant of this method I get errors:

    Request for the permission failed.

    Object 'CLRObject' could not be created.

    As I understand I have to execute the code on a server side. I have to configure a client and a server side using this: docs.microsoft.com/.../cc588679(v=ax.50)

    Is it the correct way to get a destination?

  • Verified answer
    Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    Yes, you must run the code on server. You also must add code access permissions: new InteropPermission(InteropKind::ClrInterop).assert().

    No, the link isn't about configuring where code will run. It's only debugging.

  • Verified answer
    Community Member Profile Picture
    on at

    To consume web service from X++ you have to connect service, look the description here: docs.microsoft.com/.../cc604242(v=ax.50) . Then in the code use, "InteropPermission" as Martin suggested(see post on this thread). Thank you! Then from X++ code to call declared namespace and all methods and classes inside this namespace and build your code.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 658

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 333 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans