Skip to content

Commit

Permalink
Ensure order of soap arguments based on function signature. (#10)
Browse files Browse the repository at this point in the history
## Ensure order of soap arguments based on function signature.

When an associative array is passed it does not use the key 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);
```

In this merge request we are leveraging the `__getFunctions()` from the native php soap-client and parse the argument order according to the signature. Then send the soap call to the `parent __soapCall`. 
In addition we validate if the method exists and log any arguments that are not in the signature.
  • Loading branch information
Bouwdie authored and kanariezwart committed Nov 14, 2019
1 parent 1db8984 commit 5548c5b
Show file tree
Hide file tree
Showing 5 changed files with 905 additions and 329 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"php": "^5.6 || ^7",
"ext-soap": "*",
"ext-xml": "*",
"ext-dom": "*",
"guzzlehttp/guzzle": "^6",
"psr/log": "^1.0",
"webservices-nl/common": "^0",
Expand Down
Loading

0 comments on commit 5548c5b

Please sign in to comment.