I have an Opc client, when I read the node is ExtensionObject.
the node is custom structure in Opc Ua Server PLC siemens 1500.
the value is systematically encoded as a byte.
In the example provided, the node is read with an Xml encoding.
I tried to specify to the client not to use the Binary encoding with :
ConfiguredEndpoint endpoint = new ConfiguredEndpoint(null, endpointDescription, endpointConfiguration);
endpoint.Configuration.UseBinaryEncoding = false;
This changes nothing.
I Have try this:
DataValue value = _session.ReadValue(nodeId);
ExtensionObject extObject = (ExtensionObject)value.Value;
var Decoder = new BinaryDecoder(extObject.Body as Byte[], ServiceMessageContext.GlobalContext);
var Result = Decoder.ReadXmlElement(null);
return value;
Exception :MaxByteStringLength 1048560 < 54657037
Do you have any idea what I might have missed?
Thanks in advance.
Best regards.
I try to Use BinaryDecoder and desactivating binary decoder in client.
Consider that I use reflection to auto convert the ExtensionObject by passing the required opc type
In case of single
ExtensionObjectIn case of
ExtensionObject[]Finaly the extesion to convert the ExtensionObject