From be63630028ac0405caf16a03de837a1f1e4a78eb Mon Sep 17 00:00:00 2001 From: Marco De Caro <94898951+marco-dc@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:52:06 +0100 Subject: [PATCH] Fix undefined output -> $this->portTypes[$bindingData['portType']][$operation] #123 --- src/nusoap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/nusoap.php b/src/nusoap.php index bed610e..3100bbb 100644 --- a/src/nusoap.php +++ b/src/nusoap.php @@ -4465,8 +4465,12 @@ function parseRequest($headers, $data) $this->debug('methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); // get/set custom response tag name - $outputMessage = $this->wsdl->getOperationData($this->methodname)['output']['message']; - $this->responseTagName = $outputMessage; + $opData = $this->wsdl->getOperationData($this->methodname); + if (!isset($opData['output']['name'])) { + $this->debug('No output name in WSDL for operation ' . $this->methodname); + $this->setError('Operation ' . $this->methodname . ' not present in WSDL'); + return false; + } $this->debug('responseTagName: ' . $this->responseTagName . ' methodURI: ' . $this->methodURI); $this->debug('calling parser->get_soapbody()');