We have a some objects that are exposed by WCF services (using wsHttpBinding
) and serialized into XML. Here is an extract of one of them:
[DataContract]
public class Person
{
[DataMember] private string _forename;
[DataMember] private string _middleInitial;
[DataMember] private string _surname;
[DataMember] private List<EducationRecord> _educationRecords;
[DataMember] private List<Address> _addresses;
[DataMember] private List<InternetAddress> _internetAddresses;
[DataMember] private List<PhoneNumber> _phoneNumbers;
[DataMember] private List<InternationalExperience> _internationalExperience;
[DataMember] private List<ProfessionalQualification> _professionalQualifications;
[DataMember] private List<KnownLanguage> _knownLanguages;
// And there's more ...
}
As you can see, there are many collections and some of the contained objects have further child objects beneath them. When we run this up against our production data, we find that while most Person records are fine, there are some which translate into very large serialized messages (>500 KB, for example).
Now I expect that we'll need to start pruning our object graph, but I'd like to find out which bits of data are contributing the most to the serialized message. For instance, is it the list of Address
objects, or is it some chunk of data within the InternationalExperience
objects.
Do you know of a tool that will capture and analyze the XML messages that are being sent, so that I can find out what is taking up the most space?