定制 dmt-software/webservices-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dmt-software/webservices-client

Composer 安装命令:

composer require dmt-software/webservices-client

包简介

An implementation of the CompanyInfo WebservicesNl data integration

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

A generic client for consuming the services from CompanyInfo - WebservicesNl.

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 for a complete list of supported services.

Usage

Create a Client

Create a client for communication with CompanyInfo - WebservicesNl.

<?php
 
use DMT\WebservicesNl\Client\Factory\ClientFactory;
 
$credentials = ['username' => '{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 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 
 
use DMT\WebservicesNl\Client\Client;
use DMT\WebservicesNl\DutchBusiness\Request\GetDossierV3Request;
use DMT\WebservicesNl\DutchBusiness\Response\GetDossierV3Response;

$request = new GetDossierV3Request();
$request->setDossierNumber('34221165');
 
/** @var Client $client */
/** @var GetDossierV3Response $response */
$response = $client->execute($request);

This example sends a GetDossierV3Requestnoticing to the DutchBusiness 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
 
use DMT\WebservicesNl\Client\Client;
 
/** @var Client $client */
$response = $client->dutchBusinessGetDossierV3(['dossier_number' => '34221165']);

Services

Goal is to support as many services as WebservicesNl provides. If the service you are looking for isn't available, feel free to leave a feature request.

The services that can be installed are:

Protocols

Currently this package supports the WebservicesNl endpoint for:

  • soap
  • soap_doclit

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-10