A server provides a method with an input argument from data type Date.
The client requests a call service with this method and with data type DateTime instead of Date for the input argument.
The server response BadInvalidArgument.
IMHO the server do it right!? And so the client has a bug.
Is my assumption correct?
05/30/2017
When a DataType is a sub-type of a non-Structure built-in type (in this case DateTime) the value is transferred on the wire as the base builtin type. The receiver cannot distinguish between values of the sub-type and values of the base-type and therefore has to accept values of the base-type.
That said, if specific semantics apply to the subtype in the documentation then the application may reject a value after checking those semantics but that check occurs in the application rather than the stack or SDK. In the case of Date, no specific semantics are defined so there is no reason for rejecting a valid DateTime value.
The Server should also return a specific error code for the problematic argument (i.e. BadTypeMismatch) in the InputArgumentResults array. It also may support diagnostics that give string explanations for the failure.
1 Guest(s)