Fix document literal binder for request and response
This commit is contained in:
parent
2771991fc0
commit
c4118855de
@ -11,13 +11,14 @@
|
||||
namespace BeSimple\SoapBundle\ServiceBinding;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Method;
|
||||
use BeSimple\SoapCommon\Definition\Type\TypeRepository;
|
||||
|
||||
/**
|
||||
* @author Christian Kerl <christian-kerl@web.de>
|
||||
*/
|
||||
class DocumentLiteralWrappedRequestMessageBinder implements MessageBinderInterface
|
||||
{
|
||||
public function processMessage(Method $messageDefinition, $message)
|
||||
public function processMessage(Method $messageDefinition, $message, TypeRepository $typeRepository)
|
||||
{
|
||||
if(count($message) > 1) {
|
||||
throw new \InvalidArgumentException();
|
||||
@ -26,10 +27,10 @@ class DocumentLiteralWrappedRequestMessageBinder implements MessageBinderInterfa
|
||||
$result = array();
|
||||
$message = $message[0];
|
||||
|
||||
foreach($messageDefinition->getArguments() as $argument) {
|
||||
$result[$argument->getName()] = $message->{$argument->getName()};
|
||||
foreach($messageDefinition->getInput()->all() as $argument) {
|
||||
$result[$argument->getName()] = $message;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,17 +11,15 @@
|
||||
namespace BeSimple\SoapBundle\ServiceBinding;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Method;
|
||||
use BeSimple\SoapCommon\Definition\Type\TypeRepository;
|
||||
|
||||
/**
|
||||
* @author Christian Kerl <christian-kerl@web.de>
|
||||
*/
|
||||
class DocumentLiteralWrappedResponseMessageBinder implements MessageBinderInterface
|
||||
{
|
||||
public function processMessage(Method $messageDefinition, $message)
|
||||
public function processMessage(Method $messageDefinition, $message, TypeRepository $typeRepository)
|
||||
{
|
||||
$result = new \stdClass();
|
||||
$result->{$messageDefinition->getName().'Result'} = $message;
|
||||
|
||||
return $result;
|
||||
return $message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user