__property Array_Of_LineItemBase LineItem = { index=(IS_OPTN|IS_UNBD),
read=FLineItem, write=SetLineItem, stored = LineItem_Specified };
to:
__property Array_Of_LineItemBase LineItem = { index=(|IS_UNBD),
read=FLineItem, write=SetLineItem, stored = LineItem_Specified };
There are other dynamic arrays that have the IS_OPTN flag and work fine.
Is this a bug, or is there some reason for it to work this way?
thanks,
Fred
I probably would need to see the code to assess but if IS_OPTN from the flag
fixed the problem, it means that the runtime did not *see* that the arrays
were specified. Whenever an element is optional (i.e. minOccurs="0" in the
schema), we use a Setter function, SetLineItem in your case. That setter,
when invoked, should also set a flag to indicate that the property was set
(probably setting a variable, FLineItem_Specified, to true). The runtime
then queries the LineItem_Specified method [tagged as the value to the
'stored' attribute] to determine if the item should be serialized.
So, the issue could be that FLineItem was accessed directly [IOW, bypassing
the setter]. Or it could be that somehow, there's a bug in the logic to
invoke the stored method.
If you could post a little excerpt of how the LineItem property is being
set, I'd be happy to investigate.
Cheers,
Bruneau
PS: I'll also research this issue on my end as we have several test Services
in-house with optional|unbounded elements.