Incorrect SiLAAny.from(String, Message) examples, lack of user guidance
The current implementation of SiLAAny.from(String xml, Message silaTypeValue)
is technically correct, but the examples are incorrect, and it only works for single-message values but not for the SiLA List type, which is mapped to a repeated
field in Protobuf:
Part B (section 'The payload
Field) describes that the transferred value has to be wrapped inside an outer Protobuf message, where the transferred value has the field number 1
.
So technically I could create such an outer Message
object containing the value to be transferred, and use it with SiLAAny.from(String, Message)
. But I see two issues here:
- since this outer message must always be created, as a developer I would expect this framework to create it for me.
- examples like
SiLAAny.from("<DataType><Basic>String</Basic></DataType>", SiLAString.from("test"))
are incorrect.
I found this out because a user sent Any
values from sila_java
to sila_python
and couldn't make it work because sila_python
refused to parse the Protobuf messages sent by sila_java
.