0

I need send a request using soapclient but I'm not able to change the port of target, if i try to send it addreses like "192.168.1.1:60000" I got the error "Error Fetching http headers".

my code:

    $this->client = new SoapClient($wsdlPath, array(
        'trace' => 1, 
        'exceptions' => true, 
        'ssl' => array(
            'verify_peer' => false,
            'allow_self_signed' => true
        ),
        'soap_version' => SOAP_1_2
    ));

$this->client->__setLocation($deviceAddr);      

$this->client->__setSoapHeaders($this->soapClientWSSecurityHeader($user,$pass));
luno
  • 51
  • 2
  • 1
    unless you control the target machine you cannot simply elect to send to a different port and hope for it to work – Professor Abronsius Mar 22 '19 at 19:20
  • I think it's not clear enough for you @RamRaider, the port that I want to send the soap request is listenning, my problem is i don't know exaclty how to change de default port in soap client to send it for a diferent port than the default port (80). – luno Mar 22 '19 at 19:25
  • https://stackoverflow.com/questions/12355366/how-to-specify-port-name-in-php-wsdl/30540895 might be of interest? – Professor Abronsius Mar 22 '19 at 19:27
  • You just put it in the url `http://example.com:1580` et. – ArtisticPhoenix Mar 22 '19 at 19:32
  • @ArtisticPhoenix when i tryed this i got an error ... "Error Fetching http headers" – luno Mar 22 '19 at 19:39

0 Answers0