v1.0.0 2022-09-08 16:47 UTC

This package is auto-updated.

Last update: 2024-07-16 01:33:16 UTC


Api client for NFZ EZWM service, docs (PDF):

This repo will not be often updated, but feel free to contribute.


Via Composer:

composer require ircykk/ezwm


Example how to create session (retrieve auth token and session id):


use Ircykk\Ezwm\Auth\authToken;
use Ircykk\Ezwm\Auth\session;
use Ircykk\Ezwm\AuthService\AuthClientFactory;
use Ircykk\Ezwm\AuthService\AuthService;
use Ircykk\Ezwm\AuthService\Credentials;

include_once __DIR__.'/vendor/autoload.php';

const EZWM_ENV_TEST = false;
const EZWM_SOAP_TRACE = false;

// credentials
$login = '*********';
$password = '********';
$operatorId = '***/******';
$domain = '**';
$type = '***';

// create credentials object
$credentials = new Credentials(

$authClientFactory = new AuthClientFactory();
$authClient = $authClientFactory->build(EZWM_ENV_TEST);
$authService = new AuthService($credentials, $authClient);

try {
    $sessionResponse = $authService->createSession();

    /** @var session $session */
    $session = $sessionResponse['session'];
    /** @var authToken $authToken */
    $authToken = $sessionResponse['authToken'];

    $sessionId = $session->getId();
    $authTokenId = $authToken->getId();

    echo "Session ID: $sessionId; Auth Token ID: $authTokenId";
} catch (Exception $e) {
    echo html_entity_decode($e->getMessage());

Building classes from wsdl/xsd

Repository contain prebuild classes, but you can build them yourself if you need.

Generating Service classes from schemas

Generator will generate class from wsdl schema for namespace Ircykk\Ezwm\ServiceBroker and Ircykk\Ezwm\Auth.

  1. Install composer dependencies:
    composer install
  2. Run generator
    php bin/wsdl2php.php

More details:

Generating Document classes from xsd schemas

Generator will generate class from xsd schema for namespace Ircykk\Ezwm\Schema.

  1. Install composer dependencies:
    composer install
  2. Run generator
    bash bin/

You can tweak generator config in bin/config.yml.
More details:

Fixes after build

Since session is returned in SOAP response headers we need to tweak login method in Ircykk\Ezwm\Auth\AuthenticationService class. We need add $outputHeaders to params, so we can get session id from response headers.

 * @param loginRequest $request
 * @param null $outputHeaders
 * @return string
public function login(loginRequest $request, &$outputHeaders = null)
   return $this->__soapCall('login', array($request), null, null, $outputHeaders);