Thread View: borland.public.cppbuilder.webservices.soap
2 messages
2 total messages
Started by Fred Powell
Mon, 12 May 2008 17:43
dynamic array xml missing
Author: Fred Powell
Date: Mon, 12 May 2008 17:43
Date: Mon, 12 May 2008 17:43
19 lines
1682 bytes
1682 bytes
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
Re: dynamic array xml missing
Author: Jean-Marie Babet
Date: Fri, 13 Jun 2008 16:31
Date: Fri, 13 Jun 2008 16:31
24 lines
1880 bytes
1880 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads