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

Unable to access AIF web service using SOAP Client

(0) ShareShare
ReportReport
Posted on by

I created a test project with tables, data/service contract classes and service and service group as following:

LLQt7.png

After deploying, I am even able to access and view the GetEntityList data using a .Net console application

ServiceReference1.
EntityServiceClient _Client = new ServiceReference1.EntityServiceClient();
ServiceReference1.
CallContext _CallContext = new ServiceReference1.CallContext();
_CallContext.Company =
"dat";
ServiceReference1.
CustomEntityDataContract[] _entityList = _Client.GetEntityList(_CallContext);
// ColorServiceGroup.ColorDC _Dc ;
foreach (ServiceReference1.CustomEntityDataContract _Dc in _entityList)
{
Console.WriteLine(_Dc.EntityName);
}
Console.ReadKey();

The problem is that I need to access it using a SOAP Client, tried creating lots of SOAP envelope messages but unable to view the service data. What I think I could be missing is the proper authentication tags in SOAP header, which I have no idea of, plz specify.

The header I have tried so far is like:

<s:Envelope xmlns:a="www.w3.org/.../addressing" xmlns:s="www.w3.org/.../soap-envelope">
<s:Header>
    <a:Action s:mustUnderstand="1">schemas.microsoft.com/.../GetEntityList&lt;/a:Action>
    <h:CallContext i:nil="true" xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns:h="schemas.microsoft.com/.../datacontracts" />
    <a:ReplyTo>
    <a:Address>www.w3.org/.../anonymous&lt;/a:Address>
    </a:ReplyTo>
  </s:Header>
  <s:Body>
    <EntityServiceGetEntityListRequest xmlns="http://tempuri.org" />
  </s:Body>
</s:Envelope>

Any help would be highly appreciated.

*This post is locked for comments

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

    The .NET solutions sends a SOAP message too (because that's how communication with SOAP services works), therefore you can look at what exactly is sends.

    But if you have a problem with authentication, it may fail even before sending the the message.

    If you need some advice from us, please explain the problem in detail - "unable to view the service data" doesn't sound very specific.

  • Community Member Profile Picture
    on at

    @martin

    "The .NET solutions sends a SOAP message too (because that's how communication with SOAP services works), therefore you can look at what exactly is sends."

    Exactly, I am trying to capture the calls using fiddler, though it is logging for other browser calls, but not logging for console application calls. Tried modifying machine.config to set fiddler ip and port as proxy, but still cant see the logging.

    "If you need some advice from us, please explain the problem in detail - "unable to view the service data" doesn't sound very specific."

    I will also share the WSDL service response here, it would be helpful if anyone can provide some hint on correcting the request body

  • Community Member Profile Picture
    on at

    As far as authentication is concerned, in AX Administration > Setup > Users list has domain names, user alias etc, but no password.

    So, according to technet.microsoft.com/.../aa872025.aspx if I add a <LogonAsUser> tag, would it simply be like this:

    <LogonAsUser>[domainname]/[useralias]</LogonAsUser>

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    I guess you're using TCP protocol, while Fiddler capture communication over HTTP.

    I meant WCF authentication; setup in AX becomes relevant only when you're authorized to call the service. Because you didn't give me more information, I can't say what happens in your case and I can't offer any solution without knowing the problem.

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans