Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #6462 Incorrect WSDL generated
Submitted: 2006-01-11 12:27 UTC
From: jefimm at hotmail dot com Assigned: yunosh
Status: Closed Package: SOAP
PHP Version: 4.3.8 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 43 = ?

 
 [2006-01-11 12:27 UTC] jefimm at hotmail dot com
Description: ------------ The wsdl generation code does incorrect generation of the WSDL if mulitple methods present in the __dispatch_map. If 2 methods are present in the dispatch map , first with both input and output parameters, second with one parameter (either input or output) the generated wsdl contains input and output parameters for both methods tested with 0.9.1

Comments

 [2006-01-11 12:48 UTC] jefimm at hotmail dot com
The following patch can solve this: --- Disco.php.orig Wed Jan 11 14:32:02 2006 +++ Disco.php Wed Jan 11 14:38:20 2006 @@ -233,6 +233,7 @@ $method_namespace = $namespace; } // INPUT + $has_input = $has_output = false; if (isset($method_types['in']) && is_array($method_types['in'])) { $input_message =& $this->_wsdl['definitions']['message'][]; $input_message['attr']['name'] = $method_name . 'Request'; @@ -242,6 +243,7 @@ $part['attr']['name'] = $name; $part['attr']['type'] = $typens . ':' . $type; } + $has_input = true; } // OUTPUT @@ -254,6 +256,7 @@ $part['attr']['name'] = $name; $part['attr']['type'] = $typens . ':' . $type; } + $has_output = true; } // PORTTYPES @@ -261,11 +264,13 @@ $operation['attr']['name'] = $method_name; // INPUT - $operation['input']['attr']['message'] = 'tns:' + if ($has_input) + $operation['input']['attr']['message'] = 'tns:' . $input_message['attr']['name']; // OUTPUT - $operation['output']['attr']['message'] = 'tns:' + if ($has_output) + $operation['output']['attr']['message'] = 'tns:' . $output_message['attr']['name']; // BINDING @@ -275,16 +280,20 @@ $binding['soap:operation']['attr']['soapAction'] = $action; // INPUT - $binding['input']['attr'] = ''; - $binding['input']['soap:body']['attr']['use'] = 'encoded'; - $binding['input']['soap:body']['attr']['namespace'] = $method_namespace; - $binding['input']['soap:body']['attr']['encodingStyle'] = SOAP_SCHEMA_ENCODING; + if ($has_input) { + $binding['input']['attr'] = ''; + $binding['input']['soap:body']['attr']['use'] = 'encoded'; + $binding['input']['soap:body']['attr']['namespace'] = $method_namespace; + $binding['input']['soap:body']['attr']['encodingStyle'] = SOAP_SCHEMA_ENCODING; + } // OUTPUT - $binding['output']['attr'] = ''; - $binding['output']['soap:body']['attr']['use'] = 'encoded'; - $binding['output']['soap:body']['attr']['namespace'] = $method_namespace; - $binding['output']['soap:body']['attr']['encodingStyle'] = SOAP_SCHEMA_ENCODING; + if ($has_output){ + $binding['output']['attr'] = ''; + $binding['output']['soap:body']['attr']['use'] = 'encoded'; + $binding['output']['soap:body']['attr']['namespace'] = $method_namespace; + $binding['output']['soap:body']['attr']['encodingStyle'] = SOAP_SCHEMA_ENCODING; + } } }
 [2007-01-21 18:00 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!