I have a multidimensional array, such as:
$array = array(
'a' => 1,
'b' => 2,
'c' => array('42'=>'foo', '43'=>'bar'),
'd' => 4
)
I’m trying to feed it into a SOAP call as follows:
$response = $client->SomeFunction($array);
The XML request produced ignores ‘c’. Why?
I have figured out the reason, but it wasn’t obvious to me initially.
If the array does not perfectly match up to what the server is expecting, it won’t be put into the XML.
For example, from the above example, if the server was expecting
a,banddbut notc,cwould have just been ignored and wouldn’t show in the XML. It’s that behaviour that was confusing.