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 :
Microsoft Dynamics AX (Archived)

Consuming a external webservice: cannot instantiate a class

(0) ShareShare
ReportReport
Posted on by 335

Hello,

I am consuming an external webservice in AX.

The problem is there are classes I cannot access from within AX.

For instance: the class "OpeningHour" is defined in the same namespace as the "ClientData", but I cannot reach it in AX. I can in .net though ...

Please have a look at the following:

https://i.imgur.com/7uOEglG.png

I can instantiate the clientData object in AX, but not the subclass:

https://i.imgur.com/QpOFs41.png, but both are public:

When I decompile the dll the classes seem to be evenly accessible: ("CLientdata" can be instantiated, but not the "OpeningHour" class)

dll.png

How can .net see the class but not AX? Is it because the class is situated too "deep" in the namespace?
 Am I mistaking somewhere?

On a sidenote: the class is created because of the following setting:
I set the service reference to create arrays for the collections (as AX doesn't seem to like generic lists too much :-) )

6428.serviceref.png

Hopefully someone can help me out here 

Help is greatly appreciated

Kind regards

*This post is locked for comments

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

    It seems like an inner class - it's not "too deep in the namespace"; it's actually embedded in the other class (ClientData).

    I think this isn't supported by .NET Interop. I suggest you expose it from ClientData through a method.

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 24

#2
Michel ROY Profile Picture

Michel ROY 14

#3
Jagadabi Profile Picture

Jagadabi 6

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans