Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Current »

The Genesis API service endpoints are configured to use HTTP bindings by default. If necessary, the service endpoints can can be secured using SSL over HTTP, or HTTPS protocol.

Step-by-step guide

  1. Obtain a SSL certificate for your host from a certificate authority or opt to use a self-signed certificate in a test environment.
  2. Set up SSL in IIS for the Genesis API application using IIS Manager. 
  3. Open bindings.config in the Genesis API application root directory. This file contains WCF binding configurations for transport security:
    1. wsHttpTransportSecurity for SOAP endpoints.
    2. webHttpTransportSecurity for REST endpoints.
  4. Open services.config in the Genesis API application root directory.
  5. Add a bindingConfiguration attribute to all REST endpoints with the value "webHttpTransportSecurity". 

    REST Endpoint Example
    <!-- IFoodAnalysisQueryService REST Service-->
      <service name="Esha.Genesis.Services.Rest.FoodAnalysisQueryRestService">
        <endpoint address="" 
                  binding="webHttpBinding" 
                  bindingConfiguration="webHttpTransportSecurity"
                  contract="Esha.Genesis.Services.IFoodAnalysisQueryService"
                  behaviorConfiguration="jsonBehavior" />
      </service>
  6. Modify bindingConfiguration attributes for all SOAP endpoints with the value "wsHttpTransportSecurity".

    SOAP Endpoint Example
    <!-- IFoodAnalysisQueryService SOAP Service-->
      <service name="Esha.Genesis.Services.Soap.FoodAnalysisQuerySoapService">
        <endpoint address="" 
                  binding="wsHttpBinding" 
                  bindingNamespace="http://ns.esha.com/2013/genesisapi"
                  bindingConfiguration="wsHttpTransportSecurity"
                  contract="Esha.Genesis.Services.IFoodAnalysisQueryService"
                  behaviorConfiguration="Esha.Genesis.Services.Soap.FoodAnalysisQuerySoapService"/>
        <endpoint address="mex" 
                  binding="mexHttpBinding" 
                  contract="IMetadataExchange" />
      </service>
  7. Save and close services.config. 

  8. Open service endpoints in a browser using HTTPS to verify setup is complete.


  • No labels