BeSimple/BeSimpleSoapBundle — Issue #16: Empty parameterOrder attribute for operation tag
Author: joksnet
Created: 2011-11-17 15:37:12+00:00
State: open

Hello,

When I have a soap method without any parameters, the WSDL _operation_ tag it's generated with the attribute _parameterOrder_ empty. When trying to load the file with .NET `wsdl.exe` I get *This web service does not conform to WS-I Basic Profile v1.1*.

Looking at [WS-I Basic Profile v1.1][] specification, I found this phase:

> R2305 A wsdl:operation element child of a wsdl:portType element in a DESCRIPTION MUST be constructed so that the parameterOrder attribute, if present, omits at most 1 wsdl:part from the output message.

[WS-I Basic Profile v1.1]: http://www.ws-i.org/Profiles/BasicProfile-1.1.html

I think it refers that the attribute _parameterOrder_ it mustn't be present if empty.

Here is a possible patch:

```patch
diff --git a/ServiceDefinition/Dumper/WsdlDumper.php b/ServiceDefinition/Dumper/WsdlDumper.php
index 97517f7..51aa010 100644
--- a/ServiceDefinition/Dumper/WsdlDumper.php
+++ b/ServiceDefinition/Dumper/WsdlDumper.php
@@ -78,7 +78,9 @@ class WsdlDumper implements DumperInterface
$this->qualify($this->getRequestMessageName($method)),
$this->qualify($this->getResponseMessageName($method))
);
- $portOperation->setAttribute('parameterOrder', implode(' ', array_keys($requestParts)));
+ if (!empty($requestParts)) {
+ $portOperation->setAttribute('parameterOrder', implode(' ', array_keys($requestParts)));
+ }

$baseBinding = array(
'use' => 'literal',
```