Skip to content

a2ncer/sumatra-php-soap-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installs Packagist

SOAP Client for Sumatra

Installation

composer require a2ncer/sumatra-php-soap-client:dev-master

Usage

<?php

include_once 'vendor/autoload.php';

use Sumatra\SumatraClientFactory;
use Sumatra\Type\Kunden_einwilligung_argument;

$wsdl = 'http://example.com/sumatra.wsdl';
$username = 'username';
$password = 'password';

$client = SumatraClientFactory::factory(
    $wsdl,
    $username,
    $password
);

$argument = (new Kunden_einwilligung_argument())
    ->withBegruendung('John Snow')
    ->withAnrede('Herr')
    ->withEmail('test@example.com');

try {
    $response = $client->kunden_einwilligung($argument);

    echo $response->getStatus()->getInformation();
} catch (Exception $exception) {
    echo $exception->getMessage();
}

Development Setup

composer install --ignore-platform-reqs 
docker-compose up -d
docker-compose exec php bash
apt-get update
apt-get install libxml2-dev
docker-php-ext-install soap
php -S 0.0.0.0:80