note 103305 modified in soapclient.soapclient by danbrown
| From: | danbrown@php.net | Date: | Thu, 07 Apr 2011 14:48:24 +0000 |
| Subject: | note 103305 modified in soapclient.soapclient by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178599@lists.php.net to get a copy of this message | ||
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.
--was--
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' => '10.110.1.114', // 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.
http://php.net/manual/en/soapclient.soapclient.php