Notifications
Announcements
No record found.
I have already change the class property to “Server“, but the mistake still exist.
Please always full error messages - your screenshot shows just a part of the first message. Also, paste them to the forum as text - it allows others to work with them and it also means that other people with the same problem can find this thread by searching.
You told us nothing about your implementation, but your code and the second error message suggest that it's actually a CLR class. But you have a wrong interop type in InteropPermission constructor - it should be ClrInterop, not ComInterop.
hi
look this
learn.microsoft.com/.../walkthrough-calling-an-external-web-service-from-x
DAniele
... but note that the documentation page is for AX 2012 and several things are different in AX 2009. Not WCF as such, of course, but things inside AX.
thank you very very very much, i change the InteropKind::ClrInterop, it's ok now.
hi DAniele, thank you for your answer,i change my code, now it's ok
public static str GeCompanyName()
{
str companyName;
lucktest001.SvcSoapClient lucktestsvc;
;
new InteropPermission(InteropKind::ClrInterop).assert();
lucktestsvc = new lucktest001.SvcSoapClient("SvcSoap");
companyName =lucktestsvc.FetchCompanyInfo("rpsz");
return companyName;
}
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 565 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader