itu-bswu / RentIt

Digital media rental service (academic project)
4 stars 0 forks source link

Optional parameters does not seem to work in WCF #13

Open esfdk opened 12 years ago

esfdk commented 12 years ago

Apparantly WCF does not handle optional parameters on operation contracts very well, so the "optional" parameters are not optional.

NiklasHansen commented 12 years ago

A fix would be to scrap the parameters, and replace by one parameter. This would be a new class, that would contain all the previous parameters. An example:

GetMovies() has a lot of different parameters - most are intended to be optional. By replacing all parameters with only one of type GetMoviesParameters, we would not only get a simpler service interface, but it would also be possible for the client to omit filling out some of the properties of GetMoviesParameters = optional parameters.

This is only a niceness feature, and is not crucial for the service to work. It works fine right now, and we won't fix it for this release.