https://github.com/dmt-software/webservices-client
Implementation of the CompanyInfo WebservicesNl data integration
https://github.com/dmt-software/webservices-client
companyinfo
Last synced: 3 months ago
JSON representation
Implementation of the CompanyInfo WebservicesNl data integration
- Host: GitHub
- URL: https://github.com/dmt-software/webservices-client
- Owner: dmt-software
- License: mit
- Created: 2018-07-09T19:55:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T20:04:57.000Z (about 7 years ago)
- Last Synced: 2024-11-25T06:38:08.559Z (over 1 year ago)
- Topics: companyinfo
- Language: PHP
- Size: 73.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# WebserviceNl Client
[](https://travis-ci.org/dmt-software/webservices-client)
[](https://scrutinizer-ci.com/g/dmt-software/webservices-client/?branch=master)
[](https://scrutinizer-ci.com/g/dmt-software/webservices-client/?branch=master)
A generic client for consuming the services from [CompanyInfo - WebservicesNl](https://webview.webservices.nl/documentation/files/introduction-txt.html).
## Installation
```composer require dmt-software/webservices-client```
### Service packages
Install a service package using composer:
```composer require dmt-software/webservices-dutchbusiness```
After installation all of the service methods become available in this client.
See [Services](#services) for a complete list of supported services.
## Usage
### Create a Client
Create a client for communication with CompanyInfo - WebservicesNl.
```php
'{username}', 'password' => '{password}'];
$client = ClientFactory::createClient('soap_doclit', $credentials);
```
In this case a client is returned for communication with the `soap_doclit` endpoint.
See [Protocols](#protocols) for all supported endpoints.
### Make a service call using a request
The client uses a CommandBus to delegate a request to a handler that can process it.
```php
setDossierNumber('34221165');
/** @var Client $client */
/** @var GetDossierV3Response $response */
$response = $client->execute($request);
```
This example sends a `GetDossierV3Request`noticing to the [DutchBusiness](https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business) service
and returns a `GetDossierV3Response`.
### Call a service method directly
Alternatively the client accepts a direct service method call with an array of arguments. This functionality is similar
to the native SoapClient behaviour.
> NOTE: The requests created from your call, might be erroneous without notice. This makes it hard to debug.
```php
dutchBusinessGetDossierV3(['dossier_number' => '34221165']);
```
## Services
Goal is to support as many services as [WebservicesNl](https://webview.webservices.nl/documentation/files/interfaces/more/services-txt.html#Service_names) provides.
If the service you are looking for isn't available, feel free to leave a [feature request](https://github.com/dmt-software/webservices-client/issues).
The services that can be installed are:
- [DutchBusiness](https://webview.webservices.nl/documentation/files/service_dutchbusiness-php.html#Dutch_Business)
## Protocols
Currently this package supports the WebservicesNl endpoint for:
- soap
- soap_doclit