Configuring the endpoint

To configure the endpoint to use one of the optimized interfaces, you must edit the configuration file for that endpoint. In the configuration, you will switch the contract used for the endpoint from the full Dynamics GP interface to one of the optimized interfaces. To do this, complete the following procedure.

  1. Edit the configuration file for the endpoint.

    Using a text editor, open the configuration file for the endpoint you want to change. The configuration files are typically found in this location:

    C:\Program Files\Microsoft Dynamic\GPWebServices\ServiceConfigs\

    The configuration file for the native endpoint is named DynamicsGP.config. The configuration file for the legacy endpoint is named DynamicsGPLegacy.config.

  2. Change the WSDL generation for the endpoint.

    When using an optimized interface, you must configure the Dynamics GP service to use dynamic WSDL generation. Refer to WSDL generation for more information.

    Locate the <services> element in the configuration file. The <service> element specifies the contract for the endpoint and the behavior for the WSDL generation.

    Legacy endpoint   The following value for the behaviorConfiguration attribute specifies that the dynamic WSDL is used:

    <service name="Microsoft.Dynamics.GP.WebServices.LegacyContract.DynamicsGP" behaviorConfiguration="GPDynamicMetadataBehavior">
    
**Native endpoint**   The following value for the behaviorConfiguration attribute specifies that the dynamic WSDL is used:

<pre class="checklistscript" IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml">&lt;service name="Microsoft.Dynamics.GP.WebServices.Contract.DynamicsGP" behaviorConfiguration="GPDynamicMetadataBehavior"&gt;
  1. Specify the interface used for the endpoint.

    Locate the <services> element in the configuration file. Within the <service> element you will find an <endpoint> element. The contract attribute of the <endpoint> element specifies the interface that defines the methods available for the endpoint.

    You will change the last part of the contract attribute to the name of the interface that you want to use. For example, assume you wanted to use the Sales interface, which has the name ISales. You would replace the name of the full interface with the name of optimized interface. In this case, that is "ISales".

    Legacy endpoint   The following value for the contract attribute specifies that the Sales interface is used:

    <endpoint address="DynamicsGPService.asmx" name="LegacyDynamicsGP" binding="basicHttpBinding" bindingConfiguration="BasicHttpBindingTarget" contract="Microsoft.Dynamics.GP.WebServices.LegacyContract.ISales"/>
    
**Native endpoint**   The following value for the contract attribute specifies that the Sales interface is used:

<pre class="checklistscript" IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml">&lt;endpoint address="GPService" name="GPWebService" binding="wsHttpBinding" bindingConfiguration="WSHttpBindingTarget" contract="Microsoft.Dynamics.GP.WebServices.Contract.ISales"/&gt;
  1. Save the configuration changes.

  2. Restart the Microsoft Dynamics GP Service Host.

    The Microsoft Dynamics GP Service Host must be restarted for this change to take effect. From the Start menu, locate the Administrative Tools group and choose Services. Find the entry for the Microsoft Dynamics GP Service Host. Right-click the entry and choose Restart.