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?