I think I found a bug in ToolkitService.php, function AddParameterUInt32 (XMLToolkit_12-07_Update).
I was trying to work with array of Char:
- Code: Select all
$myChararray = $TSObj->AddParameterChar('both', 4,'mychar','mychar','ABCDEFGH','',4);
and UInt32:
- Code: Select all
$myUInt32array = $TSObj->AddParameterUInt32('both', 'myUInt32','myUInt32', 4294967295,4);
myChararray is OK and my C program is able to retrieve the array passed.
myUInt32array is incorrect as only the 1st dimension ($myChararray[0]) was passed to my C program.
I made an other test with an array of Int32 and it works fine.
So I had a look at AddParameterInt32 and AddParameterUInt32 and I found a difference here:
static function AddParameterUInt32( $io, $comment, $varName = '', $value ,$dimension =0) {
return ( new UInt32Param ($io, $comment, $varName, $value, 'off', $dimension)) ;
}
The 5th param should be the dimension and not 'off'...
I simply removed it an now myUInt32array is successfully passed to my C program.
Here is my conf:
- V7R1
- Zend Server for IBM i (PHP 5.3) 5.6.0 New Installation
- Zend Server for IBM i 5.6.0 Hotfix 2
- Zend Server for IBM i 5.6.0 Hotfix 3
- XML Toolkit for IBM i 12.07
Please let me know if I misunderstood something...
Thanks.

