Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[UPDATE] bug fix

[UPDATE] bug fix when generating calls to unclean operation name
  • Loading branch information...
commit 9e5caace512a60d459ea6940fcb9fa8b9100efaf 1 parent a37f1f4
Mikaël DELSOL authored

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. +8 8 WsdlToPhpFunction.php
16 WsdlToPhpFunction.php
@@ -58,7 +58,7 @@ public function __construct($_name,$_parameterType,$_returnType)
58 58 public function getComment($_part = '')
59 59 {
60 60 $comments = array();
61   - array_push($comments,'Method to call the operation named ' . $this->getName());
  61 + array_push($comments,'Method to call the operation originally named ' . $this->getName());
62 62 if($this->getDocumentation() != '')
63 63 array_push($comments,'Documentation : ' . $this->getDocumentation());
64 64 $this->addMetaComment($comments,false,true);
@@ -173,11 +173,6 @@ public function getBody(&$_body)
173 173 $responseAsObjStart = ((WsdlToPhpGenerator::getOptionResponseAsWsdlObject() && $returnModel)?'new ' . $returnModel->getPackagedName() . '(':'');
174 174 $responseAsObjEnd = ((WsdlToPhpGenerator::getOptionResponseAsWsdlObject() && $returnModel)?')':'');
175 175 /**
176   - * Soap call
177   - */
178   - $soapCallStart = 'self::getSoapClient()->' . ($this->nameIsClean()?$this->getName() . '(':'__soapCall(' . $this->getName() . ',');
179   - $soapCallEnd = ')' . (WsdlToPhpGenerator::getOptionSendParametersAsArray()?'->parameters':'');
180   - /**
181 176 * Soap parameters
182 177 */
183 178 if($parameterModel)
@@ -218,9 +213,14 @@ public function getBody(&$_body)
218 213 else
219 214 $soapParametersStart = $soapParametersEnd = '';
220 215 /**
  216 + * Soap call
  217 + */
  218 + $soapCallStart = 'self::getSoapClient()->' . ($this->nameIsClean()?$this->getName() . '(':'__soapCall(\'' . $this->getName() . '\'' . ((!empty($soapParametersStart) || !empty($soapParametersEnd))?',array(':''));
  219 + $soapCallEnd = ((!$this->nameIsClean() && (!empty($soapParametersStart) || !empty($soapParametersEnd)))?')':'') . ')' . (WsdlToPhpGenerator::getOptionSendParametersAsArray()?'->parameters':'');
  220 + /**
221 221 * Send parameters in parameters array
222 222 */
223   - if(!empty($soapParametersStart))
  223 + if(!empty($soapParametersStart) && $this->nameIsClean())
224 224 {
225 225 $sendParametersAsArrayStart = (WsdlToPhpGenerator::getOptionSendParametersAsArray()?'array(\'parameters\'=>':'');
226 226 $sendParametersAsArrayEnd = (WsdlToPhpGenerator::getOptionSendParametersAsArray()?')':'');
@@ -230,7 +230,7 @@ public function getBody(&$_body)
230 230 /**
231 231 * Send an array
232 232 */
233   - if(!empty($soapParametersStart))
  233 + if(!empty($soapParametersStart) && $this->nameIsClean())
234 234 {
235 235 $sendArrayAsParameterStart = (WsdlToPhpGenerator::getOptionSendArrayAsParameter()?'array(':'');
236 236 $sendArrayAsParameterEnd = (WsdlToPhpGenerator::getOptionSendArrayAsParameter()?')':'');

0 comments on commit 9e5caac

Please sign in to comment.
Something went wrong with that request. Please try again.