Download the PHP package sourcetoad/soapy without Composer
On this page you can find all versions of the php package sourcetoad/soapy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sourcetoad/soapy
More information about sourcetoad/soapy
Files in sourcetoad/soapy
Informations about the package soapy
Soapy
SOAP is old, but still used. Soapy is modern, but feature limited to fit our use cases.
Heavily inspired by artisaninweb/laravel-soap.
Install
This package is currently supporting Laravel 11.x.
This package will use Laravel Auto Discovery to automatically register the Service Provider.
Documentation
Options
- wsdl - Location to flat file or URL for WSDL.
- trace - Whether to expose internal methods on SoapClient.
- cache - Flag to use for WSDL cache.
- location - Override URL to use for SOAP Requests.
- uri - Override namespace to use for SOAP Requests.
- certificate - Certificate path for authentication with Server.
- options - Array of any settings from SoapClient#options
- classmap - Array of class maps to map objects -> classes.
- typemap - Array of type maps. (Documentation WIP)
Example (Class maps)
Creating a client and making a request with class maps.
Presuming you had XML for the expected request like this.
You could produce a matching class to resemble that data.
You could then call a fictitious method name "fizz" on the SOAP Class like.
This shows the benefit of never messing with XML directly.
Likewise for the response. Imagine you got back this.
This can also be mapped with the following class.
So now you can do:
Example (No Class maps)
This example shows bare minimum WSDL location and no class maps.
Presuming you had XML for the expected request like this.
You could then call a fictitious method name "fizz" on the SOAP Class like.
This is more error prone due to human error with keys, but less work.
Example (Custom Client)
Sometimes you may have a SOAP Integration that just isn't fun. It may use something that our default SoapyClient cannot handle. This is okay, because patching a generic SOAP Client for all the strangeness that can happen is not feasible.
Start with a new class, that extends our SoapyBaseClient.
From that class. You can overload any of the functions it provides.
Then pass the class name (fully qualified) to the Curtain during generation.
All versions of soapy with dependencies
ext-simplexml Version *
ext-soap Version *
illuminate/support Version ^11.0|^12.0