How can I define an associative array in a SOAP wsdl file? This is how I define an array element type so far:
to transfer a php associative array over soap you will need to define following in your wsdl:
now specify your new defined ArrayOfKeyValueData type as the type of your result or as parameter
and specify your operation with someting like
this will work fine with some kind of web service written in php that returns something like
return array("k1" => "v1", "k2" => "v2");
if you are using php as client, you will get exactly the same array on the client side. other languges or soap libraries may produce other structure, as not every language has this kind of "associative array" concept.