diff --git a/ServiceDefinition/Dumper/WsdlDumper.php b/ServiceDefinition/Dumper/WsdlDumper.php index 5fbdf6f..abe64c3 100644 --- a/ServiceDefinition/Dumper/WsdlDumper.php +++ b/ServiceDefinition/Dumper/WsdlDumper.php @@ -79,21 +79,29 @@ class WsdlDumper implements DumperInterface $this->qualify($this->getResponseMessageName($method)) ); - if (!empty($requestParts)) { - $portOperation->setAttribute('parameterOrder', implode(' ', array_keys($requestParts))); - } - - $baseBinding = array( + $baseBinding = + $inputBinding = + $outputBinding = array( 'use' => 'literal', 'namespace' => $definition->getNamespace(), 'encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/', ); + if (!empty($requestParts)) { + $portOperation->setAttribute('parameterOrder', implode(' ', array_keys($requestParts))); + + $inputBinding['parts'] = implode(' ', array_keys($requestParts)); + } + + if (!empty($responseParts)) { + $outputBinding['parts'] = implode(' ', array_keys($responseParts)); + } + $bindingOperation = $this->wsdl->addBindingOperation( $binding, $method->getName(), - array_merge(array('parts' => implode(' ', array_keys($requestParts))), $baseBinding), - array_merge(array('parts' => implode(' ', array_keys($responseParts))), $baseBinding) + $inputBinding, + $outputBinding ); $bindingOperation = $this->wsdl->addBindingOperationHeader( $bindingOperation,