https://github.com/veewee/demo-soap-client
A demo of the new phpro/soap-client code generation tools
https://github.com/veewee/demo-soap-client
Last synced: over 1 year ago
JSON representation
A demo of the new phpro/soap-client code generation tools
- Host: GitHub
- URL: https://github.com/veewee/demo-soap-client
- Owner: veewee
- Created: 2018-02-21T16:19:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-26T19:12:56.000Z (over 8 years ago)
- Last Synced: 2025-02-01T00:57:45.137Z (over 1 year ago)
- Language: PHP
- Size: 29.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Soap-client demo
## Install dependencies
```sh
composer install
```
## Run code generation wizard
```sh
$ ./vendor/bin/soap-client wizard
```
## Example code generation wizard
```
Where would you like to store your config file? [config/soap-client.php]:
> config/soap-client.php
Wsdl location (URL or path to file):
> resources/weather.wsdl
Generic name used to name this client (Results in Client Classmap etc.):
> Weather
Directory where the client should be generated in:
> src
Namespace for your client:
> WeatherService
This tool can set some basic code generation rules. This requires some knowledge of the SOAP service.
Take a look at the message section in the WSDL. Are you able to match request and response elements based on keywords?
These keywords are used in a case insensitive regex match with '/' delimiters, escape accordingly! (yes/no) [no]:
> yes
Keyword for matching request objects []:
> ^Get.*(? Response$
```
## Run tests
If you used the settings mentioned above, you are able to run the e2e tests.
```sh
$ composer test
```
## Want to generate a more advanced codebase?
*Note:* this will generate slightly different classes so the unit tests won't work. Try to fix them to see how the models behave.
```sh
$ composer generate -- --config='config/advanced-soap-client.php'
```
## Clear generated code
Want to remove the generated code? No problem, just run
````sh
$ composer clear
````