Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-667

Patch for .Net interoperability with zero length nested arrays

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.1RC1
    • None
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 17021

    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

      Attachments

        Activity

          People

            Unassigned Unassigned
            dave_marquard@forgent.com dave_marquard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: