diff --git a/src/BeSimple/SoapBundle/ServiceBinding/RpcLiteralRequestMessageBinder.php b/src/BeSimple/SoapBundle/ServiceBinding/RpcLiteralRequestMessageBinder.php index efba52b..13abf08 100644 --- a/src/BeSimple/SoapBundle/ServiceBinding/RpcLiteralRequestMessageBinder.php +++ b/src/BeSimple/SoapBundle/ServiceBinding/RpcLiteralRequestMessageBinder.php @@ -112,9 +112,8 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface $value = $this->processType($type->getType(), $value); $messageBinder->writeProperty($property, $value); - } - - if (!$type->isNillable() && null === $value) { + } elseif (!$type->isNillable()) { + // @TODO use xmlType instead of phpType throw new \SoapFault('SOAP_ERROR_COMPLEX_TYPE', sprintf('"%s:%s" cannot be null.', ucfirst($phpType), $type->getName())); } }