开发者

Using WCF in .NET how can I make it auto generate SOAP docs like ASMX did?

I'm currently writing a web service using WCF in VB.NET.

Previous web services I wrote used ASMX but I wanted to learn WCF and so far it's going well. I actually prefer the way WCF does things.

One thing I miss开发者_JAVA技巧 however is the way that ASMX used to generate example SOAP requests and responses. It was like getting documentation for free.

Is there anyway to auto generate SOAP documentation for WCF?

If not, is there any way to generate it in a .NET page using the WSDL?


I guess this isn't supported by WCF in the same way it was for ASMX because WCF supports multiple endpoint types, not just SOAP web services (e.g. Net TCP, named pipes, etc).

SoapUI is a good little tool that can auto-generate SOAP messages from WSDL. Or you could create a small test client app, enable WCF tracing, and use the Service Trace Viewer Tool to view the messages that were sent.


I eventually found the answer. WCFExtras. The WCFExtras library allows you to document your API using XML comments and it reads those comments and inserts them into the WSDL as documentation comments. We then read this and generate HTML documentation using an application called TechWriter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜