Fix to allow ComplexType to be nillable
This commit is contained in:
parent
f0031e8923
commit
63d3611006
|
@ -96,7 +96,9 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
|
|||
$value = $p->getValue($message);
|
||||
}
|
||||
|
||||
$value = $this->processType($type->getValue(), $value);
|
||||
if ($value !== null) {
|
||||
$value = $this->processType($type->getValue(), $value);
|
||||
}
|
||||
|
||||
if (!$type->isNillable() && null === $value) {
|
||||
throw new \SoapFault('SOAP_ERROR_COMPLEX_TYPE', sprintf('"%s:%s" cannot be null.', ucfirst(Wsdl::translateType($phpType)), $type->getName()));
|
||||
|
|
|
@ -82,7 +82,11 @@ class RpcLiteralResponseMessageBinder implements MessageBinderInterface
|
|||
$p->setAccessible(true);
|
||||
$value = $p->getValue($message);
|
||||
|
||||
$p->setValue($message, $this->processType($type->getValue(), $value));
|
||||
if ($value !== null) {
|
||||
$value = $this->processType($type->getValue(), $value);
|
||||
}
|
||||
|
||||
$p->setValue($message, $value);
|
||||
}
|
||||
|
||||
if (!$type->isNillable() && null === $value) {
|
||||
|
|
Loading…
Reference in New Issue