Merge branch 'master' of https://github.com/sarunas/BeSimpleSoapBundle into sarunas-master

Conflicts:
	ServiceBinding/RpcLiteralResponseMessageBinder.php
This commit is contained in:
Francis Besset 2012-01-12 11:53:58 +01:00
commit e291afcba1
3 changed files with 16 additions and 12 deletions

View File

@ -96,12 +96,14 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
$value = $p->getValue($message);
}
$value = $this->processType($type->getValue(), $value);
if (null !== $value) {
$value = $this->processType($type->getValue(), $value);
if ($p->isPublic()) {
$message->{$type->getName()} = $value;
} else {
$p->setValue($message, $value);
if ($p->isPublic()) {
$message->{$type->getName()} = $value;
} else {
$p->setValue($message, $value);
}
}
if (!$type->isNillable() && null === $value) {
@ -111,4 +113,4 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
return $message;
}
}
}

View File

@ -81,12 +81,14 @@ class RpcLiteralResponseMessageBinder implements MessageBinderInterface
$value = $p->getValue($message);
}
$value = $this->processType($type->getValue(), $value);
if (null !== $value) {
$value = $this->processType($type->getValue(), $value);
if ($p->isPublic()) {
$message->{$type->getName()} = $value;
} else {
$p->setValue($message, $value);
if ($p->isPublic()) {
$message->{$type->getName()} = $value;
} else {
$p->setValue($message, $value);
}
}
if (!$type->isNillable() && null === $value) {

View File

@ -133,7 +133,7 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
);
$result = $result['simple_arrays'];
$this->assertEquals(array(), $result->array1);
$this->assertEquals(null, $result->array1);
$this->assertEquals(array(), $result->getArray2());
$this->assertEquals($array, $result->getArray3());
}