From c4118855de5b50dbd7ed9fb0bd61e378eb762ed8 Mon Sep 17 00:00:00 2001 From: Gianluigi 'cocciagialla' Mammarella Date: Wed, 10 Apr 2019 07:22:34 +0200 Subject: [PATCH] Fix document literal binder for request and response --- .../DocumentLiteralWrappedRequestMessageBinder.php | 9 +++++---- .../DocumentLiteralWrappedResponseMessageBinder.php | 10 ++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedRequestMessageBinder.php b/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedRequestMessageBinder.php index 5d779b0..ad082de 100644 --- a/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedRequestMessageBinder.php +++ b/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedRequestMessageBinder.php @@ -11,13 +11,14 @@ namespace BeSimple\SoapBundle\ServiceBinding; use BeSimple\SoapBundle\ServiceDefinition\Method; +use BeSimple\SoapCommon\Definition\Type\TypeRepository; /** * @author Christian Kerl */ 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; } -} \ No newline at end of file +} diff --git a/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedResponseMessageBinder.php b/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedResponseMessageBinder.php index 21c72e0..7a3fcef 100644 --- a/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedResponseMessageBinder.php +++ b/src/BeSimple/SoapBundle/ServiceBinding/DocumentLiteralWrappedResponseMessageBinder.php @@ -11,17 +11,15 @@ namespace BeSimple\SoapBundle\ServiceBinding; use BeSimple\SoapBundle\ServiceDefinition\Method; +use BeSimple\SoapCommon\Definition\Type\TypeRepository; /** * @author Christian Kerl */ 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; } -} \ No newline at end of file +}