简体   繁体   中英

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? 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.

If you could provide the syntax for svcutil.exe that would be great. I've executed svcutil.exe /? and I can't seem to get the wsdl generation to happen (if it is at all possible).

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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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