SOAP parameters in parse operations not being handled correctly

in the function declaration of wsclient_soap_parse_operations (line 184 of wsclient_soap/wsclient_soap.module) there is the following:

    // Cut off trailing ')'.
    $param_string = substr($parts[1], 0, -1);
    $parameters = explode(',', $param_string);

The parameter string being passed however is something in the line of

string $parameter1, string $parameter 2

Due to the explode "," , there occurs an error in

foreach ($parameters as $parameter) {
        $parts = explode(' ', $parameter);
        $param_type = $parts[0];
       // Remove leading '$' from parameter name.
      $param_name = substr($parts[1], 1);

For param 2 it will give $param_type -> " ", $param_name -> "tring"

by modifying the explode to use ", " instead of "," everything works :)

patch attached

Comments

klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can you provide me the WSDL file that causes the problem?

dan carlson’s picture

Wouldn't it be better to do a trim or rtrim then a substr.