BeSimple / BeSimpleSoapClient

NOT MAINTAINED - [READ-ONLY] Subtree split of the BeSimpleSoap -- clone into BeSimple/SoapClient/ (master at BeSimple/BeSimpleSoap)
http://besim.pl/
57 stars 54 forks source link

Empty parameterOrder attribute for operation tag #1

Closed joksnet closed 12 years ago

joksnet commented 12 years ago

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.

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

joksnet commented 12 years ago

Little 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',
francisbesset commented 12 years ago

You have submitted an issue in a bad repository. Please create an issue in BeSimple/BeSimpleSoapBundle: https://github.com/BeSimple/BeSimpleSoapBundle

joksnet commented 12 years ago

Ups. I'm sorry.