Hi Armin,
I was able to reproduce you problem with the 0.1 release.
When we released 0.1, we were focused very on getting the server right. The client didn't get much polish.
For example, the client does not automatically extend the lifetime of its session. That needs to be done automatically.
However, things improved quite a bit since then.
If you just drop in the open62541.c / .h generated from the current master, your problems will just magically go away. :-)
Here's the link:
http://open62541.org/releases/0b9b7095ca.zipThere are also some convenience functions for handling scalars and arrays in variants.
UA_Boolean UA_Variant_isScalar(const UA_Variant *v);
UA_StatusCode UA_Variant_setScalar(UA_Variant *v, void *p, const UA_DataType *type);
UA_StatusCode UA_Variant_setScalarCopy(UA_Variant *v, const void *p, const UA_DataType *type);
UA_StatusCode UA_Variant_setArray(UA_Variant *v, void *array, UA_Int32 elements, const UA_DataType *type);
UA_StatusCode UA_Variant_setArrayCopy(UA_Variant *v, const void *array, UA_Int32 elements, const UA_DataType *type);
Best regards
Julius