- Notifications
You must be signed in to change notification settings - Fork73
Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP
License
WsdlToPhp/PackageGenerator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Package Generator generates a PHP SDK from any WSDL.
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 platformProvidr.IO.
Package Generator generates files that are detailed in theMANIFEST.You are encouraged to read it to understand how and why the files are generated in addition to the way the generated classes are supposed to be used.
composer require wsdltophp/packagegenerator --dev
$ wget https://phar.wsdltophp.com/wsdltophp-php7.phar$ chmod +x wsdltophp-php7.phar$ mv wsdltophp-php7.phar /usr/local/bin/wsdltophp
$ docker run --rm -it mikaelcom/wsdltophp:tagname
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.jsonfile. At the end of the generation, the root directory where the package has been generated will contain thecomposer.json, thecomposer.lockfile and thevendordirectory. - not standalone: this means the package is generated as part of an existing project using its own
composer.jsonfile.
Thestandalone option is fully detailed in theStandalone section.
All the options are fully detailed in theOptions page.
useWsdlToPhp\PackageGenerator\ConfigurationReader\GeneratorOptions;useWsdlToPhp\PackageGenerator\Generator\Generator;// Options definition: the configuration file parameter is optional$options = GeneratorOptions::instance(/* '/path/file.yml' */);$options ->setOrigin('http://developer.ebay.com/webservices/latest/ebaySvc.wsdl') ->setDestination('./MySdk') ->setComposerName('myproject/mysdk');// Generator instantiation$generator =newGenerator($options);// Package generation$generator->generatePackage();
The command line is:
$ wsdltophp generate:package \ --urlorpath="http://developer.ebay.com/webservices/latest/ebaySvc.wsdl" \ --destination="./MySdk" \ --composer-name="myproject/mysdk" \ --force
In order to see all the used options, just remove the--force argument.
Such as with the command line above, simply use thedocker run command line before:
$ docker run --rm -it --volume$PWD:/var/www mikaelcom/wsdltophp:tagname generate:package \ --urlorpath="http://developer.ebay.com/webservices/latest/ebaySvc.wsdl" \ --destination="/var/www/MySdk" \ --composer-name="myproject/mysdk" \ --force
In order to see all the used options, just remove the--force argument.
First released on 03 April 2021, maintained until version 6.0 is released. Please read theUPGRADE-4.0 note in order to acknowledge the main changes.
First released on 04 May 2018, maintained until version 5.0 is released. Please read theUPGRADE-3.0 note in order to acknowledge the main changes.
NOT MAINTAINED ANYMORE: even if version 5 is not published nor is expected soon, maintaining 2 versions, especially for an old PHP version, is time consuming, sorry for the people who would be still using it which would encounter issues fixed in the latest version.
Not maintained since 03 April 2021.
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, model, container, parser, file, packagegenerator$ phpunit --testsuite=model
Testing usingDocker
Thanks to theDocker image ofphpfarm, tests can be run locally underany PHP version using the cli:
- php-7.4
First of all, you need to create your container which you can do usingdocker-compose by running the below command line from the root directory of the project:
$ docker-compose up -d --build
You then have a container namedpackage_generator in which you can runcomposer commands andphp cli commands such as:
# install deps in container (using update ensure it does use the composer.lock file if there is any)$ dockerexec -it package_generator php-7.4 /usr/bin/composer update# run tests in container$ dockerexec -it package_generator php-7.4 -dmemory_limit=-1 vendor/bin/phpunit
Please seeCONTRIBUTING for details. In addition, code documentation is atdoc.wsdltophp.com.
Developers who helped on this project are listed in thecomposer.json file asContributor and are:
- Gemorroj
- ceeram
- Georgiy Oganisyan
- Jan Zaeske
- Tom Mottram
- Catirau Mihail
- Alexander M. Turek
- Valérian Girard
- hordijk
- Andreas Möller
- Andreas Kintzinger
- Hendrik Luup
- Jacob Dreesen
- Clifford Vickrey
- Arnaud POINTET
- dypa
- tbreuss
- Paul Melekhov
- Alex Krátký
If you have any question, please read theOptions page about the available options to generate the package.
There is also aFAQ that contains miscellaneous questions about the package generation and its usage.
Then if you still have a question, feel free tocreate an issue.
The MIT License (MIT). Please seeLicense File for more information.
About
Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.


