WCF: Interfaces, Generics and ServiceKnownType

后端 未结 5 1539
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 03:59

I have the following:

[ServiceContract]
[ServiceKnownType(typeof(ActionParameters))]
[ServiceKnownType(typeof(SportProgram))]
[ServiceKnownType(typeof(Action         


        
5条回答
  •  半阙折子戏
    2020-12-16 04:29

    This is one of the problems that I solve with ServiceStack.NET - My Open Source .NET and MONO Web Services Framework.

    Service Stack was heavily influenced by Martin Fowlers Data Transfer Object Pattern as it allows you to simply use DTO's to define your web services - i.e. the SOA way :).

    I avoid this limitation that's inherent in WCF by generating my own WSDL's that behave as you would expect them to. As a benefit of replacing WCF's complex configuration / ServiceContract's model - The SOAP web services also works on MONO - see the live demo.

提交回复
热议问题