Skip to end of metadata
Go to start of metadata

XML Polymorphism

The Problem

Polymorphism in XML is when an element is declared to be of a supertype (in the XSD) and its actual occurrences in the documents are of sub-types of this. Here's an example:

Then:

An occurrence of such an element will be:

In such cases, not only your XML [de]serialization will be slower when using eBay's SOA Framework (a.k.a. Project Turmeric), but you won't be able to use ProtoBuf.

The Solution

Assuming you have the similar types LongFieldValue and StringFieldValue, in order to enable ProtoBuf for your service this will have to be converted to an XML Choice like this:

And the element will now look like this:

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.