离线共享WCF接口规范
团队 S 远离团队 C。团队 S 使用 WSHTTP 绑定创建 WCF Web 服务。 S 团队与 C 团队共享接口规范的最佳方式是什么?在 asmx Web 服务时代,S 团队会通过电子邮件将 WSDL 发送给 C 团队。这仍然是正确的方法吗?
Team S are remote from team C. Team S create a WCF web service with WSHTTP bindings. What's the best way for team S to share the interface specification with team C? In the days of asmx web services team S would have emailed the WSDL to team C. Is this still the way to go?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果两个团队没有任何在线连接,您可以让团队 S 创建一个服务客户端代理(可能在单独的类库程序集中),该代理导入服务(
Add Service Reference
视觉工作室)。只需将该源代码发送给其他团队,他们就应该能够实例化代理客户端并调用这些客户端上的方法。
如果两个团队确实有在线连接,请参阅 Mikecito 的答案 - 只需导航到服务 URL +
?wsdl
,您就拥有了 WSDL - 始终是最新的,始终是最新的。If the two teams don't have any online connection, one thing you could have Team S create a service client-proxy, possibly in a separate class library assembly, that imports the service (
Add Service Reference
in Visual Studio).Just send that source code to the other team and they should be able to instantiate proxy clients and call methods on those clients.
If the two teams do have online connection, see Mikecito's answer - just navigate to the service URL +
?wsdl
and you have your WSDL - always up to date, always current.只需向他们发送服务 URL,然后他们就可以单击页面上方便的 wsdl 链接。简单如馅饼。
如果您想直接共享 wsdl,只需将“?wsdl”(不带引号)添加到服务 URL 的末尾。
Just send them the service URL, and then they can click on the handy wsdl link right there on the page. Simple as pie.
If you want to share the wsdl directly, just add "?wsdl" (without the quotes) to the end of your service URL.