phpro / soap-client

A general purpose SOAP client for PHP
MIT License
861 stars 175 forks source link

Add the ability to select specific services by port / service name #558

Open veewee opened 2 weeks ago

veewee commented 2 weeks ago

Fixes https://github.com/phpro/soap-client/discussions/557

This allows for selecting specific ports / services in the WSDL:

https://github.com/php-soap/wsdl-reader/releases/tag/0.19.0

 EngineOptions::defaults($wsdl)
-     ->withPreferredSoapVersion(SoapVersion::SOAP_12)
+     ->withWsdlServiceSelectionCriteria(
+         ServiceSelectionCriteria::defaults()
+             ->withPreferredSoapVersion(SoapVersion::SOAP_12)
+             ->withServiceName('SpecificServiceName')
+             ->withPortName('SpecificPortName')
+     );