I have generated c# classes based on a soap response format.
What is the best and easiest way to map an incoming soap response to these classes?
Can you share a code example?
Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 29th April 2021
Hi Mieke
This example should help you out. Consider the following xml soap response:
You could use a free online tool to convert the response into C# classes. The result should be similar to this:
When you have the corresponding classes, use the System.Xml.Serialization.XmlSerializer to deserialize the "xml as string" into objects:
Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 29th April 2021