INFO: Limitation of Array Bounds in Soap Toolkit 2.0 (306764)



The information in this article applies to:

  • Microsoft SOAP Toolkit 2.0

This article was previously published under Q306764

SUMMARY

Simple Object Access Protocol (SOAP) Toolkit 2.0 does not transfer information related to the array bounds that the client or server program defines.

MORE INFORMATION

For example, if a method of a SOAP server takes array of integers as a parameter, and a Visual Basic SOAP client application calls the method as follows:
    Dim i As Integer 
    Dim ArrayArg(5 To 10) As Integer
   
    For i = 5 To 10
        ArrayArg(i) = i * i * i
    Next
    
    soapclient.vbIntArray ArrayArg
				
the SOAP document that is sent to the server looks similar to the following:
...
<IntArrayArg xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" SOAPSDK3:arrayType="SOAPSDK2:short[6]" 
xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance" SOAPSDK4:type="SOAPSDK3:Array">
  <SOAPSDK3:short>125</SOAPSDK3:short> 
  <SOAPSDK3:short>216</SOAPSDK3:short> 
  <SOAPSDK3:short>343</SOAPSDK3:short> 
  <SOAPSDK3:short>512</SOAPSDK3:short> 
  <SOAPSDK3:short>729</SOAPSDK3:short> 
  <SOAPSDK3:short>1000</SOAPSDK3:short> 
  </IntArrayArg><BR/>
...
				
The server method that is called cannot determine what array bounds the client are used for the array that is being passed.

A similar problem occurs when an array is returned to the client as a return value of the method call. In this case, the client program must use the normal array index (for example, in Visual Basic, indexes start at 0 or 1).

Modification Type:MajorLast Reviewed:10/5/2001
Keywords:kbinfo KB306764