Fixed issue #29
This commit is contained in:
parent
a50215b649
commit
ea4d031084
@ -61,6 +61,16 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
|
||||
foreach ($message->item as $complexType) {
|
||||
$array[] = $this->checkComplexType($phpType, $complexType);
|
||||
}
|
||||
|
||||
// See https://github.com/BeSimple/BeSimpleSoapBundle/issues/29
|
||||
if (in_array('BeSimple\SoapCommon\Type\AbstractKeyValue', class_parents($phpType))) {
|
||||
$assocArray = array();
|
||||
foreach ($array as $keyValue) {
|
||||
$assocArray[$keyValue->getKey()] = $keyValue->getValue();
|
||||
}
|
||||
|
||||
$array = $assocArray;
|
||||
}
|
||||
}
|
||||
|
||||
$message = $array;
|
||||
|
@ -46,6 +46,16 @@ class RpcLiteralResponseMessageBinder implements MessageBinderInterface
|
||||
if ($isArray) {
|
||||
$array = array();
|
||||
|
||||
// See https://github.com/BeSimple/BeSimpleSoapBundle/issues/29
|
||||
if (is_array($message) && in_array('BeSimple\SoapCommon\Type\AbstractKeyValue', class_parents($phpType))) {
|
||||
$keyValue = array();
|
||||
foreach ($message as $key => $value) {
|
||||
$keyValue[] = new $phpType($key, $value);
|
||||
}
|
||||
|
||||
$message = $keyValue;
|
||||
}
|
||||
|
||||
foreach ($message as $complexType) {
|
||||
$array[] = $this->checkComplexType($phpType, $complexType);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user