Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP

Package Generator

Package Generator generates a PHP SDK from any WSDL.

License Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads StyleCI SensioLabsInsight

Package Generator generates a PHP SDK from any WSDL so you can easily consume any SOAP Web Service without wondering how SOAP is used under the hood.

Package Generator provides many options to generate your package even if a few are required. This project has been tested with many WSDL and is currently used on the platform Providr.IO.


In a project:

composer require wsdltophp/packagegenerator

With command line:

For PHP5
$ wget
$ chmod +x wsdltophp-php5.phar
$ mv wsdltophp-php5.phar /usr/local/bin/wsdltophp
For PHP7
$ wget
$ chmod +x wsdltophp-php7.phar
$ mv wsdltophp-php7.phar /usr/local/bin/wsdltophp


There is two ways to generate your package (apart from being in a project and generating it through the command line):

  • standalone (default behaviour): this means the package is generated as an independent project with its own composer.json file. At the end of the generation, the root directory where the package has been generated will contain the composer.json, the composer.lock file and the vendor directory.
  • not standalone: this means the package is generated as part of an existing project using its own composer.json file.

The standalone option is fully detailed in the Standalone section.

All the options are fully detailed in the Options page.

In a project:

// Options definition: the configuration file parameter is optional
$options = GeneratorOptions::instance(/* '/path/file.yml' */);
// Generator instanciation
$generator = new Generator($options);
// Package generation

With command line:

The command line is:

$ wsdltophp generate:package \
    --urlorpath="" \
    --destination="./MySdk" \
    --composer-name="myproject/mysdk" \

In order to see all the used options, just remove the --force argument.



First released on 04 May 2018, maintained until version 5.0 is released. Please read the UPGRADE-3.0 note in order to acknowledge the main changes.


First released on 29 Apr 2016, maintained until version 4.0 is released.


Not maintained anymore


# launch all tests
$ phpunit

# launch a testsuite: command, configuration, utils, wsdlhandler, model, container, parser, file, packagegenerator
$ phpunit --testsuite=model


Please see CONTRIBUTING for details. In addition, code documentation is at


Developers who helped on this project are listed in the composer.json file as Contributor and are:


If you have any question, please read the Options page about the available options to generate the package.

There is also a FAQ that contains miscellaneous questions about the package generation and its usage.

Then if you still have a question, feel free to create an issue.


The MIT License (MIT). Please see License File for more information.