WCF BasicHttpBinding Http Post
是否可以发布到 IIS 中托管的 WCF 服务?我知道使用 REST 可以做到这一点,但我确实需要 WSDL 生成和 SOAP 标头。我需要将现有的 ASMX Web 服务转换为 WCF,但我还需要允许我的客户继续通过 http posts 使用该服务(通过 javascript 进行 xml http 请求)。 REST 是我唯一的选择吗?
Is it possible to post to a WCF service hosted in IIS? I know that that this is possible using REST but I really need the WSDL generation and SOAP headers. I need to transition an existing ASMX web services to WCF but I need to also allow my clients to continue to utilize the service via http posts (xml http request via javascript). Is REST my only option?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,对于 SOAP 服务,您需要使用 SOAP 方法和操作 - 您不能使用 HTTP POST 在 SOAP 服务上“转储”某些数据。
如果您需要 HTTP POST,那么 REST 就是最佳选择。
No, with a SOAP service, you need to use the SOAP methods and actions - you cannot use HTTP POST to "dump" some data on a SOAP service.
If you need HTTP POST, then REST is the way to go.
您还可以使用 REST 风格的 WCF
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
You can also use REST style WCF
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx