Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppHttpControllers;
- use ArtisaninwebSoapWrapperFacadesSoapWrapper;
- class SoapController extends Controller {
- public function demo()
- {
- // Add a new service to the wrapper
- SoapWrapper::add(function ($service) {
- $service
- ->name('currency')
- ->wsdl('path/to/wsdl')
- ->trace(true);
- ->options(['user' => 'username', 'pass' => 'password']);
- });
- // Using the added service
- SoapWrapper::service('currency', function ($service) {
- var_dump($service->getFunctions());
- var_dump($service->call('Otherfunction'));
- });
- }
- }
- <?php
- namespace AppHttpControllers;
- use ArtisaninwebSoapWrapperFacadesSoapWrapper;
- class SoapController extends Controller {
- public function demo()
- {
- // Add a new service to the wrapper
- SoapWrapper::add(function ($service) {
- $service
- ->name('currency')
- ->wsdl('path/to/wsdl')
- ->trace(true);
- });
- $data = [
- 'user' => 'username',
- 'pass' => 'password',
- ];
- // Using the added service
- SoapWrapper::service('currency', function ($service) use ($data) {
- var_dump($service->call('Login', [$data]));
- var_dump($service->call('Otherfunction'));
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement