Following mail is from the soapbuilders list. I tested 1.1 beta, but it isn't fixed in that version. If you don't get a reply today, i'll ask again with my msdn account.
ArentJan --------------------- From: "Alex DeJarnatt" <[EMAIL PROTECTED]> Date: Fri Aug 30, 2002 5:54 pm Subject: RE: [soapbuilders] .NET and zero length arrays Hi David. Yep, this is a bug in our reader implementation. The problem (as you guessed) is the empty array element. If you return <mybars ...></mybars> it'll parse correctly. We're aware of this bug and have fixed it in the next release. Sorry for the inconvenience. thanks alex -----Original Message----- From: David Crowley [mailto:dcrowley@;s...] Sent: Friday, August 30, 2002 8:45 AM To: [EMAIL PROTECTED] Subject: [soapbuilders] .NET and zero length arrays I've noticed a problem with .NET. Suppose I am returning a "parameters" value which is an array of struct "foo" defined as something like this: struct bar; struct foo { bar[] mybars; }; If my RPC response packets looks like this (standard stuff removed for brevity, SOAP 1.1 RPC encoding, etc.): <SOAP:Envelope> <SOAP:Body> <m:GetInfoResponse> <parameters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="m:foo[2]"> <item xsi:type="m:foo"> <mybars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="m:bar[0]"/> </item> <item xsi:type="m:foo"> <mybars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="m:bar[1]"> <item xsi:type="bar">...</item> </mybars> </item> </parameters> </m:GetInfoResponse> </SOAP:Body> </SOAP:Envelope> I am expecting "parameters" to be an array with two (2) foos, the first having zero (0) bars and the second having one (1) bar. .NET seems to choke on the first zero length array of bars and apparently stops parsing the rest of the "parameters" array. The "parameters" value comes back with a *single* foo and no error message to indicate a problem. All other tool kits I have tried seem to de-serialize the message properly into an array with 2 elements. Now, if I add the attribute xsi:nil="true" to the problematic array then .NET seems to parse everything fine. The current behavior of just ignoring/skipping the rest of the array is sub-optimal. Comments? Thanks, David -----Original Message----- From: Steve Loughran [mailto:steve_l@;iseran.com] Sent: dinsdag 5 november 2002 0:44 To: [EMAIL PROTECTED] Subject: Re: Empty arrays not serialized properly ----- Original Message ----- From: "Martin Jericho" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 04, 2002 3:20 PM Subject: Re: Empty arrays not serialized properly > I posted a question on Monday on the > microsoft.public.dotnet.framework.aspnet.webservices newsgroup, titled "Bug > parsing zero-length arrays". So far there is not reply, but the group is > monitored by microsoft people. If you are a MSDN subscriber or have a > support agreement, you might have more luck through direct channels. > The thing that confuses me is that the author of the original posting > mentioned it will be fixed in .net v2, which isn't mentioned anywhere. Soapbuilders is the other place to burble, especially if you can come up with some nice example that people can test. If its a problem across multiple implementations then its a real issue to alert people to.