When receiving an InterAppCall, the deserializing fails with below exception.
Seems that the type of the list isn't matching.
System.Collections.Generic.List`1
[
[Skyline.IAC.Endpoints.Resources.EndpointHealth, Unified Streaming Unified Origin Monitoring.1.0.1.4_B10.QAction.1, Version=1.0.0.7, Culture=neutral, PublicKeyToken=null] ],
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not compatible with 'System.Collections.Generic.List`1
[
[Skyline.IAC.Endpoints.Resources.EndpointHealth, British Telecom Unified Streaming Single Channel Failover.1.0.0.1_B5.QAction.1, Version=1.0.0.11, Culture=neutral, PublicKeyToken=null] ],
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
The received interapp rawdata contains the extended type info
"$type": "System.Collections.Generic.List`1[[Skyline.IAC.Endpoints.Resources.EndpointHealth, Unified Streaming Unified Origin Monitoring.1.0.1.4_B10.QAction.1, Version=1.0.0.7, Culture=neutral, PublicKeyToken=null]], ",
Do note that I'm using class library as nuget packages (both protocols use same version).
Does anyone has an idea how to get this working?
Hi Andries,
I had something similar and was able to get it working by making my own serializer and added List<MyClass> as possible Type.
Thanks Jens
For my solution I added typeof(List) to the List of knownTypes.
Then I’m not using my own serializer so the code will be like this:
List knownTypes = new List
{
typeof(ReturnCachedEndpointHealth),
typeof(List),
};
IInterAppCall receivedCall = InterAppCallFactory.CreateFromRaw(rawData, knownTypes);
This is fine as internally InterAppCalls will create a default serializer based on the known types like how Jens does it. So either way is ok.
I think this could work indeed!