Retail Order Instruction REST service
Configuration
This service uses OrderInstructionService, PortfolioService and AccountService. These three WCF services need to be configured for HTTPS.
@Tómas Tómasson will document how that is done
C:\KodiakOrderManagementServer\Config\ServiceConfig\system.servicemodel.behaviors
C:\KodiakOrderEntryServer\Config\ServiceConfig\system.servicemodel.behaviors
<behavior name="HttpsBehaviour">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
C:\KodiakOrderManagementServer\Config\ServiceConfig\system.servicemodel.bindings.config
C:\KodiakOrderEntryServer\Config\ServiceConfig\system.servicemodel.bindings.config
<binding name="WSHttpBinding_IPerformanceService" textEncoding="utf-8" maxReceivedMessageSize="20000000">
<readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000" />
</binding>
<binding name="WSHttpBinding_IExternalQueryService" textEncoding="utf-8" maxReceivedMessageSize="20000000">
<readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000" />
</binding>
C:\KodiakOrderManagementServer\Config\ServiceConfig\system.servicemodel.client.config
C:\KodiakOrderEntryServer\Config\ServiceConfig\system.servicemodel.client.config
<?xml version="1.0" encoding="utf-8" ?>
<client>
<endpoint address="http://test-app-01/Libra.Services/Assetmanager/PerformanceService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IPerformanceService" contract="LibraServices.IPerformanceService" name="WSHttpBinding_IPerformanceService">
<!-- <identity> -->
<!-- <userPrincipalName value="srv.iisapppool_test@fjaf.internal" /> -->
<!-- </identity> -->
</endpoint>
<endpoint address="http://test-app-01/Libra.Services/Portfolio/ExternalQueryService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IExternalQueryService" contract="LibraServicesExternal.IExternalQueryService" name="WSHttpBinding_IExternalQueryService">
<!-- <identity> -->
<!-- <userPrincipalName value="srv.iisapppool_test@fjaf.internal" /> -->
<!-- </identity> -->
</endpoint>
</client>
In appsettings.json there are a few configs that need to be set;
Add a connection string for the database in the ConnectionStrings section
In Kodi.Kodiak.CustomerOrders.DataAccess DbContext - set the name of the connection string as parameter in the GetConnectionString() function
Urls - The URL that the swagger is available on. In browser add /swagger/index.html
BaseUrl - for example https://test-app-01.foss.internal:8081 for Fossar test
OrderinstructionServiceURL, PortfolioServiceURL, AccountServiceURL - URLs to the services in Https
ExternalSystemId - Libra
OmsUserId
AllocateWhenFilled - true/false
DirectToMarket - true/false
BypassBackoffice - true/false
To be able to run the service, the user that runs it has to have ‘Log on as a batch job’ and ‘Log on as a service’ permissions.
On Fossar test the service is run by the user svc_oms_service_test. It is in Task Scheduler to be run at 07:00 every day.
For the oms user to access the PortfolioService and AccountService you probably need to add them to the ACCESSRULE table.