开发者

WCF DataContract IsReference = true and .NET 1.1

I have a WCF service which basically returns

[DataContract(IsReference = true)]
public class Person
{
    public Person[] relatedPersons;
}

As you can see, it has a cercular reference, but ofcourse, IsReference = true solves the problem. Almost.

Among numerous clients, there is a .NET 1.1 application, which calls this service through basicHttpBinding. If the response contains more th开发者_开发问答an one reference to the same Person, .NET 1.1 client doesn't seem to resolve the references in the XML and the second reference becomes just an empty inctance.

Any ideas how to solve this problem?


No way to solve this with a .NET 1.1 client. Circular references in XML are not a standard SOAP specification which means that both the client and the server need to use WCF if you want it to work. You could always write a custom serializer on the client side which will resolve those references but I suspect it will be a lot of work if you need it to work in the general case.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜