Loading ...
Sorry, an error occurred while loading the content.

Re: [soapbuilders] itemType value for SOAP 1.2 array of array

Expand Messages
  • noah_mendelsohn@us.ibm.com
    ... Sure is. Most obviously, a two dimensional array must be rectangular. An array of array allows for differing extents, and perhaps differing types, for
    Message 1 of 7 , Sep 3, 2002
    • 0 Attachment
      Jacek Kopecky writes:

      >> Oh, I have to add (just in case it's not clear)
      >> that a two-dimensional array is a different
      >> beast from an array of arrays.

      Sure is. Most obviously, a two dimensional array must be rectangular. An
      array of array allows for differing extents, and perhaps differing types,
      for the constituent sub-arrays. Jacek has clarified the declaration of
      two-dimensional arrays in SOAP encoding.

      Am I right that an array of arrays might be represented by, among other
      means, the following:


      <outer enc:itemType="xsd:anyType" enc:itemSize="2">
      <inner enc:itemType="xsd:integer" enc:itemSize="1">
      <item>15</item>
      </inner>
      <inner enc:itemType="xsd:float" enc:itemSize="3">
      <item>15.3E-5</item>
      <item>25.2</item>
      <item>37.3256</item>
      </inner>
      </outer>

      If so, then the case where both inner arrays are of the same type
      (xsd:int) must be viewed as a special case of the example above. The case
      where both are of the same type and extent is a yet more restricted
      special case, and is the one that most resembles a basic two dimensional
      array.

      BTW: in the specific case of the C language, the supported
      multi-dimensional array is specifically defined as an array of arrays, but
      with the restriction that type types are compatible and the bounds
      rectangular (regular, in the case of higher than 2D.) Page 195 of K&R
      [1] gives the example:

      static int x3d[3][5][7]

      and says about it:

      "...declares a static three dimensional array of integers, with rank
      3x5x7. In complete detail, x3d is an array of three items; each item is
      an array of five arrays; each of the latter arrays is an array of seven
      integers." So, both views at once in the case of the C language, but the
      fundamental model is arrays of arrays.

      [1] Kernighan, B.W., Ritchie, D.M., "The C Programming Language", (c) 1978
      Bell Telephone Laboratories, ISBN 0-13-110163-3

      ------------------------------------------------------------------
      Noah Mendelsohn Voice: 1-617-693-4036
      IBM Corporation Fax: 1-617-693-8676
      One Rogers Street
      Cambridge, MA 02142
      ------------------------------------------------------------------
    Your message has been successfully submitted and would be delivered to recipients shortly.