Selecting the service port with PHP's SoapClient
I'm currently integrating with a SOAP service which has two different services defined. The relevant part of the WSDL is: <wsdl:service name="Config"> <wsdl:port name="BasicHttpBinding_IConfiguration" binding="tns:BasicHttpBinding_IConfiguration"> <soap:address location="http://nonsecure.example.com/Configuration.svc"/> </wsdl:port> <wsdl:port name="BasicHttpsBinding_IConfiguration" binding="tns:BasicHttpsBinding_IConfiguration"> <soap:address location="https://secure.example.com/Configuration.svc"/> </wsdl:port> </wsdl:service> I discovered that PHP's SoapClient will select the first port it encounters and doesn't provide a way to select another one. This was a nuisance as I wanted to use the SSL one. Through research, I discovered that I can… continue reading.