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)

tcp binding changing to httpbinding.

(0) ShareShare
ReportReport
Posted on by

Hello,

I am calling WCF  (same for AIF) service from REST api control

I got the message: I always get a message like: could not find default endpoint element that references contract 'SPLSqlDisplayMethodService.SPLSqlDisplayMethod' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I see that WCF is set by default setting the configuration with tcp binding, and rest api shall be set with httpbinding.

Can I change the default behavior of specific WCF (or AIF) service to http binding?

What if I call the WCF from Rest API - What are the binding configurations I must change for the web.config file to the setting for <system.serviceModel> clause from nettcp to http binding configuration.

Is the problem on the configuration file.

I put something like this for both endpoints, when running from Rest API tool:

 <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding_SPLSqlDisplayMethod" />
      </netTcpBinding>
      <webHttpBinding>
        <binding name="webHttpBinding_SPLSqlDisplayMethod" />
      </webHttpBinding>
    </bindings>
    <client>
      <endpoint address="net.tcp://axdev:8201/DynamicsAx/Services/SPLSqlDisplayMethodGroup" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_SPLSqlDisplayMethod" contract="SPLSqlDisplayMethodService.SPLSqlDisplayMethod" name="NetTcpBinding_SPLSqlDisplayMethod">
        <identity>
          <userPrincipalName value="AXSVC@packer.steels"/>
        </identity>
      </endpoint>
      <endpoint address="http://AXDEV:8101/DynamicsAx/Services/SPLSqlDisplayMethodGroup" binding="webHttpBinding" bindingConfiguration="webHttpBinding_SPLSqlDisplayMethod" contract="SPLSqlDisplayMethodService.SPLSqlDisplayMethod" name="webHttpBinding_SPLSqlDisplayMethod">
        <identity>
          <userPrincipalName value="AXSVC@packer.steels"/>
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>


What is wrong?

*This post is locked for comments

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

    Regarding HTTP, read Walkthrough: Exchanging documents by using the HTTP adapter [AX 2012].

    Regarding REST, WCF does support it but AX exposes SOAP endpoints only.

  • Community Member Profile Picture
    on at

    I am creating service+service group and generally deploy the service group,

    as on: sumitsaxfactor.wordpress.com/.../create-your-first-custom-service-ax-2012

    I want using existing service I created already.

    Is there any way, when I am deploying, that the default deployment for the servicegroup will be as webHttp?

    Also, the example shall refer to existing web-site, so I need a way to call the service with http protocol - Can I call the current service I created by http protocol (and not net/tcp as by default)?

    Thanks :)

  • Verified answer
    Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    No, service groups don't use the HTTP adapter. Service groups / basic ports are for simple scenarios only; use an enhanced port instead if you want a different adapter.

    Yes, you can call existing services via HTTP. The example doesn't refer to an existing site - it says: You must install web services on Internet Information Services (IIS) and verify that the default website is working. See Install web services on IIS.

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