Incorrect ArrayType when serializing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've noticed that when you have an array of structs, the array type is
always looks like arrayType="Struct[1]" which is incorrect, because that
type should be the type of struct you defined in your WSDL for the
elements in the array.

For example, if you have an array of "MyObj" then the arrayType
attribute should look like arrayType="MyObj[2]"

The error scenario that procuded this problem was a Java Apache Axis
client making a request to a PEAR SOAP Server.

A work around to this I've found is in Base.php, line 473 add:
if ($array_type == 'Struct' {
    $array_type = get_class($array_val);
}

This isn't really a good solution in PHP4 because get_class always
returns the class name in all lowercases, which pretty much forces you
to make that complex type defined in all lower cases.

Any thoughts on this area?  I've tried a lot of setting types and such
in the SOAP_Values that are used in the response, but it always came out
as an arrayType="Struct[]"

Thanks,
Al Baker

[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux