将 WCF 服务公开给 asmx 客户端和 WCF 客户端
我们有一个 WCF 服务,它的操作接收数据协定对象的 List
作为参数,并返回不同数据协定对象的 List
,例如。
List<CheckOutResponse> ProcessCheckOut(List<CheckOutRequest> obj);
该服务当前由 WCF 客户端使用,并且运行良好。
我们现在需要向基于 .NET 1.1 构建的遗留应用程序公开相同的服务。我了解需要在服务的 web.config
中进行的绑定更改、使用 basicHttp
绑定并设置正确的服务行为等。
我的问题是数据契约。我相信 .NET 1.1 客户端使用 XMLSerializer
并且这不能与数据协定一起使用。
我真的不想将数据协定更改为其他一些 .NET 1.1 兼容的复杂类型,因为我们需要使用现有的 WCF 客户端进行大量回归测试。
有没有人想出解决这个问题的方法?
We have a WCF service that has operations which receive a List
of data contract objects as their parameter and return a List
of different data contract objects eg.
List<CheckOutResponse> ProcessCheckOut(List<CheckOutRequest> obj);
This service is currently being consumed by a WCF client and it works great.
We now need to expose the same service to a legacy application built on .NET 1.1. I understand the binding changes that I need to make in the service's web.config
, use the basicHttp
binding and set the correct service behavior etc.
My problem is the data contracts. I believe that the .NET 1.1 clients use the XMLSerializer
and this cannot work with data contracts.
I really don't want to change the data contracts to some other .NET 1.1 compatible complex types because we'd then need a load of regression testing with the existing WCF client.
Has anyone worked out a solution to this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
序列化应该没有问题。 .NET 1.1 客户端只会看到一个将值放入元素而不是属性中的结构。
There should be no problem with the serialization. The .NET 1.1 client will simply see a structure that places the values into elements instead of attributes.