There are two kinds of changes that we have to looking in to this.
1. WSDL tool changes
2. DeSerializer changes.
1.) WSDL tool
1.1 How to decide if we have an "all" construct in WSDL?
1.2 When we come crosses "all" construct generate the code accordingly. Changes should be in DeSerialization part of the complex types.
2.1 Decide minOccurs 0 or 1.
If 1 then get (use current code.)
If 0 then check & get
2.2 Check & get
Here there are 3 possible changes.
1.We can have a list of element stored and can compare with the pulled one and select the matched one.
List Pulled one
Here we sellect the B from the list.
But in this option have additional check logic in generated code for each element. Also have to change current DeSerializer code.
2.Also we can go element in sequence order and if it is not matched with pulled one then go to next. But here need to figure out how to recover pulled element.
3.Passer peak ahead.
Can we look ahead (without pulling) what element is the next?
Advantage of this is can keep the current DeSerializer code as it is.
Still additional check logic will be in generated code.