Write service: ByteArray from/to ByteString conversion is not done on write
Description
Write service makes possible to write a ByteArray into a ByteString and conversely but it results in changing the Value Variant type. This is not expected since it might make it incompatible with the actual DataType.
Analysis
The value to write is converted prior to set the value in the variant but it was not use when the value is actually set. As a consequence the Variant type was changed in this case which was not expected. Using the converted value is fixing this issue.