Hi,
We have a protocol that implements several InterApp calls. Both the protocol and the automation script are using Nuget SLC.Lib.Common version 1.2.2.2 in order to use InterApp calls. However when sending the InterApp call from the Automation script to the protocol we can see that the protocol processes the request correctly and it sets the response on the correct parameter 9000001. But the automation script does not receive the response and it times out.
Here's the code snippet:
Would anyone have a clue of what is going on?
Thanks,
Jason
Hi Jason,
There is another question + Answer linked to your problem: interappcall-jsonserializationexception-type-mismatch
In essence to make it work, you will have to also define your custom classes used in the request or responses as Known Types.
After that, the interapp communication should work fine.
Please let us know if you need any further help!
Hi Jason
A couple of things I would check in the implementation are
- The protocol is assigning the correct Guid to the response message in the executor (response Guid must match the message Guid)
- The same serializer is being used by both sides of the communication
These are some things I overlooked in the past and that could help
Be aware, the marked Answer is a workaround that can still fail in situations.
Took a deeper look and found a bug in the class library where the Answer from Thijs will still break if you have more than one List<T> in your KnownTypes.
We're looking into a fix for this in the upcoming weeks. (from the time of this comment)
Details:
We perform a .Name on the known types to include in the json. For a List<T> this always returns List without the internal type. If there's more than one List the code notices .Name is not unique so it falls back to using .FullName.
FullName according to .NET Documentation should only every return the Namespace + Class and leave out the Assembly (and it does for most things). But there's a bug in NET where if the type is a collection the type inside the collection will include the Assembly and not just the namespace + class. This causes the problems with deserialization for Lists and collections.
We're looking into using other calls or filtering out the assemblies.
This has now been fixed.
Using class library version
>1.2.2.3 or >1.1.4.3
Thank you Thijs, this solved my issue 😉