note 103305 deleted from soapclient.soapclient by crell
| From: | crell@php.net | Date: | Mon, 04 Apr 2022 16:51:17 +0000 |
| Subject: | note 103305 deleted from soapclient.soapclient by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218094@lists.php.net to get a copy of this message | ||
Note Submitter: simonlang at gmx dot ch
----
Example for a soap client with HTTP authentication over a proxy:
<?php
new SoapClient(
'service.wsdl',
array(
// Stuff for development.
'trace' => 1,
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
// Auth credentials for the SOAP request.
'login' => 'username',
'password' => 'password',
// Proxy url.
'proxy_host' => 'example.com', // Do not add the schema here (http or
https). It won't work.
'proxy_port' => 44300,
// Auth credentials for the proxy.
'proxy_login' => NULL,
'proxy_password' => NULL,
)
);
?>
Providing an URL to a WSDL file on the remote server (which as well is protected with HTTP
authentication) didn't work. I downloaded the WSDL and stored it on the local server.