Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dynamic array xml missing

9 views
Skip to first unread message

Fred Powell

unread,
May 12, 2008, 1:43:46 PM5/12/08
to
I am just moving from BCB 6 to 2007.
For two separate web services, dynamic arrays are missing from the generated
xml.(that had several elements added to them)
In the imported .h, I removed the IS_OPTN flag, changing:

__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


Jean-Marie Babet

unread,
Jun 13, 2008, 12:31:55 PM6/13/08
to
Hello 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.


0 new messages