Axis
  1. Axis
  2. AXIS-667

Patch for .Net interoperability with zero length nested arrays

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.1RC1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Operating System: Windows NT/2K
      Platform: PC

      Description

      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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            dave_marquard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development