Skip to content

Instantly share code, notes, and snippets.

@jferrao
jferrao / MySoapClient.php
Last active November 23, 2021 07:00
PHP SoapClient extension to persist any non http or non port 80 calls.
<?php
/**
* Allows the PHP SoapClient to persist any non http or non port 80 calls.
*
* When SoapClient in WSDL mode with a scheme or a port others then http and 80, the first
* connection goes through correctly but all subsequent ones revert back to http and no
* port in the URI. This class fixes that and allows the SoapClient to use the same scheme
* and port as the ones defined when a new instance of the class is created.
*