You can create your own HTTP handler by implementing the HandlerInterface
<?php
use Phpro\SoapClient\Soap\Handler\HandlerInterface;
use Phpro\SoapClient\Soap\HttpBinding\SoapRequest;
use Phpro\SoapClient\Soap\HttpBinding\SoapResponse;
use Phpro\SoapClient\Soap\HttpBinding\LastRequestInfo;
class YourHandler implements HandlerInterface
{
// Transform a soap request into a soap response:
public function request(SoapRequest $request): SoapResponse;
// Collect the last handled request and response information:
public function collectLastRequestInfo(): LastRequestInfo;
}
- Allow HTTP middlewares by implementing the
Phpro\SoapClient\Middleware\MiddlewareSupportingInterface
.