如何在 Asp.net Core 中使用肥皂网络服务? [英] How to use soap web services in Asp.net Core?

查看:12
本文介绍了如何在 Asp.net Core 中使用肥皂网络服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些由 wsdl 生成的用于肥皂网络服务的类.这些正在使用命名空间 System.Web.Services.如何在 asp.net core 中使用它们?

I have got some classes generated by wsdl for soap web services. These are using namespace System.Web.Services. How can I use them in asp.net core?

推荐答案

几天前我已经回答了以下问题.

I have answered few days back on following question.

ASP.NET 5 添加 WCF 服务参考

在上述情况下,有一个 WCF 服务,而在你的情况下,它是 Web 服务.

In above case there is a WCF service and in your case it is Web Service.

以下您应该关注或考虑的事情.

Following thing you should concern or consider.

  1. 它不适用于 CoreCLR
  2. 您必须按照以下方式添加对System.Web.Services"的引用.

  1. It will not work with CoreCLR
  2. You have to add reference to "System.Web.Services" following way.

aspnet50": {框架组件":{
系统.Web.服务":"},依赖":{ClassLibrary2":1.0.0-*"}}

aspnet50": { "frameworkAssemblies": {
"System.Web.Services": "" }, "dependencies": { "ClassLibrary2": "1.0.0-*" } }

所有其他步骤都类似,您必须创建类库项目并添加该项目的引用或直接将从 WSDL 生成的类添加到您的 asp.net 5 项目.

All other steps are similar that you have to create classlibrary project and add reference of that project or directly add class generated from WSDL to your asp.net 5 project.

注意:对于这个答案,我使用了 VS 2015 CTP 5.

Note : For this answer I have used VS 2015 CTP 5.

这篇关于如何在 Asp.net Core 中使用肥皂网络服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆