Skip to content

Order of soap arguments

Latest
Compare
Choose a tag to compare
@kanariezwart kanariezwart released this 14 Nov 14:54
· 9 commits to master since this release

Ensure order of soap arguments based on function signature

When an associative array is passed, the soap adapter in platform-connector does not respect the array keys for argument order. This means that the following code passes the last_name as first argument, whilst in the signature this is the second parameter.

$arguments = [
    'last_name' => 'Lastname',
    'first_name' => 'Firstname',
];

$results = $client->getAdapter()->call('complianceSearchPersons', $arguments);
  • The connector leverages the __getFunctions() from the native php soap-client to parse the argument order according to the signature. Then send the soap call to the parent __soapCall.
  • Validate if the method exists and log any arguments that are not in the signature.