添加webservice服务

This commit is contained in:
zgf committed 2023-09-01 18:23:57 +08:00
1 parent bdaaa0d5d9
commit eef6df7099
7 files changed
+286

No files matched your search

+10
View File
@@ -14,6 +14,9 @@ using WalkingTec.Mvvm.Mvc;
using HHWMS.Web.Support;
using HHWMS.Web;
using Quartz;
using SoapCore;
using Microsoft.Extensions.DependencyInjection.Extensions;
using MESTOWMSService;
var builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
@@ -50,6 +53,8 @@ builder.Services.AddWtmContext(builder.Configuration, (options) => {
options.FileSubDirSelector = SubDirSelector;
options.ReloadUserFunc = ReloadUser;
});
builder.Services.TryAddScoped<IContract, WmsMesService>();
builder.Services.AddSoapCore();
builder.Services.AddScoped(typeof(IUnitWork), typeof(UnitWork));
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
@@ -72,6 +77,11 @@ app.UseWtmSwagger(false);
app.UseSwaggerExt();
app.UseWtm();
app.AddQuartzJobs();
app.UseEndpoints(endpoints => {
endpoints.UseSoapEndpoint<IContract>("/wmsMesService.asmx", new SoapEncoderOptions(), SoapSerializer.DataContractSerializer);
});
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(