Issue Details (XML | Word | Printable)

Key: AXIS-667
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Assignee: Axis Developers Mailing List
Reporter: dave_marquard
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Axis

Patch for .Net interoperability with zero length nested arrays

Created: 13/Feb/03 04:27 AM   Updated: 24/Feb/04 12:30 AM
Component/s: Serialization/Deserialization
Affects Version/s: 1.1RC1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File minimized-tags-patch.txt 2003-02-13 04:28 AM dave_marquard 3 kB
Environment:
Operating System: Windows NT/2K
Platform: PC

Bugzilla Id: 17021


 Description  « Hide
The Microsoft .Net Framework 1.0 is unable to deserialize complex objects that
contain nested zero length arrays. As detailed in previous postings to the
axis-user list [1], this is due to a bug in .Net 1.0 where Microsoft's
deserializer is unable to handle the minimized tags that Axis 1.1rc generates
for these empty arrays such as:

<myArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[0]"/>

The work around is to instead send the non-minimized version:

<myArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[0]"></myArray>

which is equivalent, yet does not trigger the bug in .Net.

The attached patch adds a new global configuration option to Axis called
"sendMinimizedElements". When this option is set to false, Axis will never
generate minimized elements; this will work around the .Net bug and allow Axis
to send empty arrays to Microsoft clients.

The default value for the new option is "true", which does not change Axis's
previous behavior.

I feel this patch should be included in Axis 1.1 final. It is extremely small
and low risk, and it does not change Axis's behavior unless the new
"sendMinimizedElements" option is set to false. However, it is a big
interoperability win, as it allows .Net clients consume objects that include 0
length arrays from Axis.

[1] http://marc.theaimsgroup.com/?l=axis-user&m=102432107114992&w=2The Microsoft
.Net Framework 1.0 is unable to deserialize complex objects that contain nested
zero length arrays. As detailed in previous postings to the axis-user list [1],
this is due to a bug in .Net 1.0 where Microsoft's deserializer is unable to
handle the minimized tags that Axis 1.1rc generates for these empty arrays such as:

<myArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[0]"/>

The work around is to instead send the non-minimized version:

<myArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[0]"></myArray>

which is equivalent, yet does not trigger the bug in .Net.

The attached patch adds a new global configuration option to Axis called
"sendMinimizedElements". When this option is set to false, Axis will never
generate minimized elements; this will work around the .Net bug and allow Axis
to send empty arrays to Microsoft clients.

The default value for the new option is "true", which does not change Axis's
previous behavior.

I feel this patch should be included in Axis 1.1 final. It is extremely small
and low risk, and it does not change Axis's behavior unless the new
"sendMinimizedElements" option is set to false. However, it is a big
interoperability win, as it allows .Net clients consume objects that include 0
length arrays from Axis.

[1] http://marc.theaimsgroup.com/?l=axis-user&m=102432107114992&w=2

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
dave_marquard added a comment - 13/Feb/03 04:28 AM
Created an attachment (id=4835)
patch against 1.1rc1 to add 'sendMinimizedElements' option

James Snell added a comment - 21/Feb/03 02:08 AM
This isn't a bug in Axis and we're not going to start making special case
changes to deal with bugs in other Web service products. .NET 1.1 apparently
fixes this issue.

dave_marquard added a comment - 03/Mar/03 07:24 AM
Can this bug be reopened and the patch applied in time for 1.1rc2? From the
discussion on axis-dev last week, it sounds like most committers are in favor of
the patch (or at least not against it).

Davanum Srinivas added a comment - 04/Mar/03 06:37 AM
Re-opening

Davanum Srinivas added a comment - 04/Mar/03 06:39 AM
Checked in patch since Glen issued a VOTE request and no one objected.

-- dims

Steve Loughran added a comment - 04/Mar/03 09:08 AM
I just renamed the property, giving it an axis. prefix, as per all the other
recent properties being added to axis. This stops us conflicting so much when we
run Axis inside another webapp.

Oh, and documented it too. Remember, we like documentation to go with code.