Giter Club home page Giter Club logo

bigregister-soap's Introduction

BIG Register SoapClient

Build Status Scrutinizer Code Quality

This is a lightweight implementation of the BIG register Soap interface.. A mapping of all the Soap types is provided.

Installation

Start by installing composer. Then, install this library:

$ php composer.phar require "waarneembemiddeling/bigregister-soap"

Requirements

PHP >=5.3.0 and ext-soap

Usage

Most users will be satisfied by using the Service class provided. The service class parses the response into php arrays and transforms all ids into readable values.

Perform a search with the service

<?php
// Will return only one or none result
$service = new Wb\BigRegister\SoapClient\Service();
print_r($service->findByRegistrationNumber('19023424101'));

Search by name and city

<?php
// Will return only one or none result
$service = new Wb\BigRegister\SoapClient\Service();
print_r($service->findByLastnameAndCity('Janssen', 'Amsterdam'));

Usage of the Client

For power users who just want to use the raw unaltered response we offer the possibility to use the Client. Creating a new instance is as simple as:

<?php

$client = new \Wb\BigRegister\SoapClient\Client();

Perform a search with the client

Search on a number:

<?php

$client = new \Wb\BigRegister\SoapClient\Client();
$request = new \Wb\BigRegister\SoapClient\Model\ListHcpApproxRequest();
$request->RegistrationNumber = '123';
$response = $client->ListHcpApprox4($request);

// dump the response
print_r($response);

Overriding the constructor of the native SoapClient

We're using the native php SoapClient. If you want to change the WSDL (f.e. if you want to use the demo environment) or want to override the options in order to debug the client you can do so:

<?php

$wsdl = 'http://host.tld/myWsdl';
$options = array(
    'trace' => true
);
$client = new \Wb\BigRegister\SoapClient\Client($wsdl, $options);

For more information about the native client check php.net.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.