In WCF, is it better to have several contracts for work or to have only one transaction with a contract for polymorphic data?

I was wondering if it was better in WCF to use several work contracts or to have only one contract with a contract for polymorphic data.

Let me give you a small example:

[OperationContract]
action1Answer action1(action1data a);

[OperationContract]
action2Answer action2(action2data a);

or

[OperationContract]
actionAnswer action(actionContract a);

The contract action will be an abstract class that inherits both action1Contract and action2Contract. The action contract will define a member function do()in its interface, which, in turn, will be overloaded in child classes

Personnaly , , actionContract . , WCF, , !

+3
2

SOA, :

, , ; 2 . ( , SOAP WCF, wsdl .NET- , . WSDL , .)

, , , , KnownTypeAttributes ( , marc_s) - , .

+3

, № 2 - .

: SOA/WCF , , - SOA ( , SOAP) , WSDL/XSD, .

- , KnownType ( ServiceKnownType), WCF, - , .

+2

Source: https://habr.com/ru/post/1749210/


All Articles