Skip to content

Commit

Permalink
Complex data types fix for passing TypeId to IComplexTypeInstance (#1371
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AlinMoldovean committed Apr 20, 2021
1 parent 77a3da8 commit 087415b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Stack/Opc.Ua.Core/Types/Encoders/BinaryDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public IEncodeable DecodeMessage(System.Type expectedType)
}

// read the message.
IEncodeable message = ReadEncodeable(null, actualType);
IEncodeable message = ReadEncodeable(null, actualType, absoluteId);

// check that the max message size was not exceeded.
if (m_context.MaxMessageSize > 0 && m_context.MaxMessageSize < (int)(m_istrm.Position - start))
Expand Down Expand Up @@ -2017,7 +2017,7 @@ private ExtensionObject ReadExtensionObject()
try
{
xmlDecoder.PushNamespace(element.NamespaceURI);
IEncodeable body = xmlDecoder.ReadEncodeable(element.LocalName, systemType);
IEncodeable body = xmlDecoder.ReadEncodeable(element.LocalName, systemType, extension.TypeId);
xmlDecoder.PopNamespace();

// update body.
Expand Down
4 changes: 2 additions & 2 deletions Stack/Opc.Ua.Core/Types/Encoders/JsonDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public IEncodeable DecodeMessage(System.Type expectedType)
}

// read the message.
IEncodeable message = ReadEncodeable("Body", actualType);
IEncodeable message = ReadEncodeable("Body", actualType, absoluteId);

// return the message.
return message;
Expand Down Expand Up @@ -1443,7 +1443,7 @@ public ExtensionObject ReadExtensionObject(string fieldName)

if (systemType != null)
{
var encodeable = ReadEncodeable("Body", systemType);
var encodeable = ReadEncodeable("Body", systemType, typeId);
if (encodeable == null)
{
return extension;
Expand Down
2 changes: 1 addition & 1 deletion Stack/Opc.Ua.Core/Types/Encoders/XmlDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public object ReadExtensionObjectBody(ExpandedNodeId typeId)
if (systemType != null)
{
PushNamespace(m_reader.NamespaceURI);
var encodeable = ReadEncodeable(m_reader.LocalName, systemType);
var encodeable = ReadEncodeable(m_reader.LocalName, systemType, typeId);
PopNamespace();

return encodeable;
Expand Down

0 comments on commit 087415b

Please sign in to comment.