Pergunta

I have only ever seen it being used to 'overcome' the diferences between OOP and SOA.

Foi útil?

Solução

It's a mechanism allowing the serializer to be informed of all types used by this web service so that they are correctly emitted in the WSDL and known by the clients. So consider it whatever you want: hack, feature, ... I consider it as a way to make the clients know all possible types.

Outras dicas

I don't think it's a hack. The only thing that doesn't really sit right with me is that you have to attach the attribute to the base class when using inheritance to tell it what types are derived from it. This is a bit upsidedown but can be done programatically so it's not the end of the world.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top