WCF WebHttp Services创建代理类

时间:2012-03-22 01:08:27

标签: c# asp.net wcf rest

我使用了这个模板:http://visualstudiogallery.msdn.microsoft.com/fbc7e5c1-a0d2-41bd-9d7b-e54c845394cd,创建了我的服务,一切都好。

问题是在应用程序中使用它,如何使用xsd.exe和模式生成客户端代理类。我知道它会生成这样的东西:http://www.ageektrapped.com/blog/wp-content/uploads/serializer/generated.cs.html

当我学习这个时,我使用visual studio命令提示符来生成类,但现在我不记得它是如何完成的。

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

我已经解决了这个问题,使用响应Xml Schema创建了一个xsd文件,可以在http://localhost:0000/Service1/help/operations/GetCollection获得,然后在命令行中使用xsd / c service1.xsd来生成.cs文件。