Closed mschnide closed 13 years ago
It's not possible at the moment to have associative arrays. What's your usecase? Maybe I can give you some advice how to implement it for this special case.
My example: I have an associative array, but would it transmit as an 'normal' array:
$itemlist = array('firstitem' => 'first', 'seconditem' => 'second');
My workaround: Before creating the soap-response I change the associative array to a normal array.
A solution could be to have an annotation to ignore the keys ...
I don't know it it's possible.
Kind regards
Am Dienstag, 9. August 2011, 14:52:31 schrieben Sie:
It's not possible at the moment to have associative arrays. What's your usecase? Maybe I can give you some advice how to implement it for this special case.
another option is to model this with a class. if your keys are not varying you can just create a class with the keys as attributes. Or you introduce a class like:
<?php
MapEntry
{
public $key;
public $value;
}
and send an array of those objects.
With version 4.0.0 it is only possible to add a 'normal' array (index as numbers). Could it be possible to add also associative arrays? (index as strings)
Thanks
Or exists a solution to add associative arrays to this 'soap response generator' ?