Workaround for PHP SOAP request failure when wsdl defines service port binding as https and port 80?

后端 未结 2 1855
旧时难觅i
旧时难觅i 2021-01-24 08:20

I am consuming a SOAP web service using php5\'s soap extension. The service\' wsdl was generated using Axis java2wsdl, and whatever options are used during generation result in

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-24 08:42

    You might want to try overriding the hostname/port using the $options array that you can pass as the second argument to SoapClient's constructor:

    $client = new SoapClient("some.wsdl", array('proxy_host' => "https://example.org", 'proxy_port' => 443);

提交回复
热议问题