diff --git a/src/BeSimple/SoapClient/SoapClient.php b/src/BeSimple/SoapClient/SoapClient.php index 4683cb0..0e68fc0 100644 --- a/src/BeSimple/SoapClient/SoapClient.php +++ b/src/BeSimple/SoapClient/SoapClient.php @@ -123,6 +123,16 @@ class SoapClient extends \SoapClient return $this->performHttpSoapRequest($soapRequest); } + protected function getSoapClientOptions() + { + return $this->soapClientOptions; + } + + protected function getSoapOptions() + { + return $this->soapOptions; + } + /** * @param string $location Location * @param string $action SOAP action diff --git a/src/BeSimple/SoapClient/SoapClientNativeMethodsTrait.php b/src/BeSimple/SoapClient/SoapClientNativeMethodsTrait.php index 8fb534d..e185cae 100644 --- a/src/BeSimple/SoapClient/SoapClientNativeMethodsTrait.php +++ b/src/BeSimple/SoapClient/SoapClientNativeMethodsTrait.php @@ -4,12 +4,11 @@ namespace BeSimple\SoapClient; use BeSimple\SoapBundle\Soap\SoapAttachment; use BeSimple\SoapClient\SoapOptions\SoapClientOptions; +use BeSimple\SoapCommon\SoapOptions\SoapOptions; use Exception; trait SoapClientNativeMethodsTrait { - /** @var SoapClientOptions */ - protected $soapClientOptions; /** @var SoapAttachment[] */ private $soapAttachmentsOnRequestStorage; /** @var SoapResponse */ @@ -36,6 +35,16 @@ trait SoapClientNativeMethodsTrait */ abstract protected function performSoapRequest($request, $location, $action, $version, array $soapAttachments = []); + /** + * @return SoapClientOptions + */ + abstract protected function getSoapClientOptions(); + + /** + * @return SoapOptions + */ + abstract protected function getSoapOptions(); + /** * Avoid using __call directly, it's deprecated even in \SoapClient. * @@ -130,7 +139,7 @@ trait SoapClientNativeMethodsTrait private function checkTracing() { - if ($this->soapClientOptions->getTrace() === false) { + if ($this->getSoapClientOptions()->getTrace() === false) { throw new Exception('SoapClientOptions tracing disabled, turn on trace attribute'); } }