note 41068 added to ref.soap
| From: | mikx at mikx dot de | Date: | Mon, 29 Mar 2004 13:12:23 +0000 |
| Subject: | note 41068 added to ref.soap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67318@lists.php.net to get a copy of this message | ||
It took me a while to properly establish a password protected client connection via https on
windows/apache1.3. Here my little guide:
1. The SOAP extension isn't activated by default (PHP5 RC1). Just add
"extension=php_soap.dll" to the php.ini and don't forget to set the extension_dir
properly (in most cases "c:\php\ext").
2. Add "extension=php_openssl.dll" to the php.ini. This module depends on libeay32.dll and
ssleay32.dll - copy them from your php folder to your system32 folder.
3. Restart apache
4. The sourcecode
$client = new SoapClient("https://yourLogin:yourPassword@foo.com/bar.wsdl",
array(
"login" => "yourLogin",
"password" => "yourPassword",
"trace" => 1,
"exceptions" => 0));
$client->yourFunction();
print "<pre>\n";
print "Request: \n".htmlspecialchars($client->__getLastRequest()) ."\n";
print "Response: \n".htmlspecialchars($client->__getLastResponse())."\n";
print "</pre>";
Currently it seems to be necessary to add your login and password both in the uri and in the options
array. Not sure if this is the expected behavior.
----
Manual Page -- http://www.php.net/manual/en/ref.soap.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41068
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41068&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41068&report=yes
Search -- http://master.php.net/manage/user-notes.php