Polymorph methods in WCF
I'm sure that the code below did work a few weeks ago.
[OperationContract]
[WebInvoke]
String Hazaa(TypeUno input);
[OperationContract]
[WebInvoke]
String Hazaa(TypeDuo input);
Someone has changed something (possibly me, not that I can think of
anything) and now, the service nags about polymorphism. I'm required to
add Name to the operation contract like so. The call I'm performing is via
URL address line and targets an other method, Ping, which is on GET method
base. These two below are POST.
[OperationContract(Name="Uno")]
[WebInvoke]
String Hazaa(TypeUno input);
[OperationContract(Name="Duo")]
[WebInvoke]
String Hazaa(TypeDuo input);
What can have changed?! It's not a big problem to go with names at the
moment but still - the testing code (that I know did work) makes a call to
the service client with the same name but different input types.
No comments:
Post a Comment