using phptester to test the following code:
<?phptry {
$opts = array(
'http' => array(
'user_agent' => 'PHPSoapClient'
)
);
$context = stream_context_create($opts);
$wsdlUrl = 'http://ws.portaledu.com.br:8051/wsConsultaSQL/MEX?wsdl';
$soapClientOptions = array(
"login" => "XxXxXxXx",
"password" => "XxXxXxXxX",
"stream_context" => $context,
"cache_wsdl" => WSDL_CACHE_NONE
);
$client = new SoapClient($wsdlUrl, $soapClientOptions);
echo $status =(string) simplexml_load_string($client->RealizarConsultaSQL(['codSentenca'=>'06','codColigada'=>$CODCOLIGADA,'codSistema'=>'S','parameters'=>'CODCOLIGADA='.$CODCOLIGADA.';IDPS='.$IDPS.';CPF='.$CPF.';DTNASCIMENTO='.$DTNASCIMENTO])->RealizarConsultaSQLResult)->Resultado->DESCRICAO;
}
catch(Exception $e) {
echo $e->getMessage();
}
I get the return:
WARNING SoapClient :: SoapClient ( link ): failed to open stream: Connection refused on line number 17
Why do not you authenticate, do I need to release any port other than 8051 to make SOAP requests?