C# rence作为SOAP已经很老了(虽然很多人还在使用),我不相信VSCode中实现了一种自然的方式。我担心你是对的。至于“相当老”的部分——好吧,我们的银行系统似乎认为使用NET2.0是可以的,NET3.5觉得升级太匆忙了,所以我需要使用这个恐龙技术。@K

C# rence作为SOAP已经很老了(虽然很多人还在使用),我不相信VSCode中实现了一种自然的方式。我担心你是对的。至于“相当老”的部分——好吧,我们的银行系统似乎认为使用NET2.0是可以的,NET3.5觉得升级太匆忙了,所以我需要使用这个恐龙技术。@K,c#,visual-studio,web-services,asp.net-core,visual-studio-code,C#,Visual Studio,Web Services,Asp.net Core,Visual Studio Code,rence作为SOAP已经很老了(虽然很多人还在使用),我不相信VSCode中实现了一种自然的方式。我担心你是对的。至于“相当老”的部分——好吧,我们的银行系统似乎认为使用NET2.0是可以的,NET3.5觉得升级太匆忙了,所以我需要使用这个恐龙技术。@KonradViltersten——我添加了一些来自旧VB.NET项目的示例代码,如果从头开始,希望可以在构建它时提供帮助(可能比VisualStudio生成的版本更简洁,因为imho的版本过于臃肿).FYI我没有投反对票。事实上,我只是对你加1


rence作为SOAP已经很老了(虽然很多人还在使用),我不相信VSCode中实现了一种自然的方式。我担心你是对的。至于“相当老”的部分——好吧,我们的银行系统似乎认为使用NET2.0是可以的,NET3.5觉得升级太匆忙了,所以我需要使用这个恐龙技术。@KonradViltersten——我添加了一些来自旧VB.NET项目的示例代码,如果从头开始,希望可以在构建它时提供帮助(可能比VisualStudio生成的版本更简洁,因为imho的版本过于臃肿).FYI我没有投反对票。事实上,我只是对你加1。我鄙视投反对票。不是每个人都像我们那样幸运。我们可以选择一行解决方案。跳过WSDL并使用提供程序自动生成类。+1表示基于OSX的建议。默认情况下,这只会生成异步方法。如果还需要同步方法,请添加--sync参数。I.e.dotnet svcuti--同步。。。
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Results>
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://example.com/api/index.php?wsdl" filename="index.wsdl" />
  </Results>
</DiscoveryClientResultsFile>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1586.0"),  _
 System.Diagnostics.DebuggerStepThroughAttribute(),  _
 System.ComponentModel.DesignerCategoryAttribute("code"),  _
 System.Web.Services.WebServiceBindingAttribute(Name:="ExampleAPIBinding", [Namespace]:="urn:ExampleAPI"),  _
 System.Xml.Serialization.SoapIncludeAttribute(GetType(MyCustomType1)),  _
 System.Xml.Serialization.SoapIncludeAttribute(GetType(MyCustomType2)),  _

 Partial Public Class ExampleAPI
    Inherits System.Web.Services.Protocols.SoapHttpClientProtocol

 End Class
<?xml version="1.0" encoding="utf-8"?>
<!--
    This file is automatically generated by Visual Studio .Net. It is
    used to store generic object data source configuration information.
    Renaming the file extension or editing the content of this file may
    cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="MyMethodName" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
   <TypeInfo>ExampleAPI.SOAP.ClientMerchant, Web References.SOAP.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
dotnet-svcutil https://svn.apache.org/repos/asf/airavata/sandbox/xbaya-web/test/Calculator.wsdl
dotnet tool install --global dotnet-svcutil
nano ~/.bash_profile
export PATH=$PATH:$HOME/.dotnet/tools
. ~/.bash_profile
cd MY-PROJECT-FOLDER/Library
dotnet-svcutil PATH-TO-MY-WSDL/my-wsdl.xml
dotnet add package System.ServiceModel.Primitives
dotnet add package System.ServiceModel.Http