简体   繁体   English

从 dll 生成 WSDL?

[英]Generate a WSDL from a dll?

Is it possible to generate a WSDL from a .NET ASMX-based web application without hosting it in IIS?是否可以从基于 .NET ASMX 的 web 应用程序生成 WSDL 而无需将其托管在 IIS 中? Ideally, I'd like to point svcutil.exe (or wsdl.exe?) to the dll and have it spit out all the WSDL for the web application.理想情况下,我想将 svcutil.exe(或 wsdl.exe?)指向 dll,并让它为 web 应用程序吐出所有 WSDL。

If you could provide the syntax for svcutil.exe that would be great.如果您可以提供 svcutil.exe 的语法,那就太好了。 I've executed svcutil.exe /?我执行了 svcutil.exe /? and I can't seem to get the wsdl generation to happen (if it is at all possible).而且我似乎无法让 wsdl 一代发生(如果可能的话)。

If I call:如果我打电话:

svcutil.exe myapplication.dll

I get the message:我收到消息:

Generating metadata files...
Warning: No metadata files were generated. No service contracts were exported.
To export a service, use the /serviceName option. To export data contracts, specify 
the /dataContractOnly option. This can sometimes occur in certain security contexts, 
such as when the assembly is loaded over a UNC network file share. If this is the 
case, try copying the assembly into a trusted environment and running it.

(Yes, I realize that ASMX is quite outdated. We are in the process of deprecating it.) (是的,我意识到 ASMX 已经过时了。我们正在弃用它。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM