|
Re: Webservices using https: msg#00112php.nusoap.general
Oops. Here is that SSL client. <?php /* * $Id: sslclient.php,v 1.1 2004/01/09 03:23:42 snichol Exp $ * * SSL client sample. * * Service: SOAP endpoint * Payload: rpc/encoded * Transport: https * Authentication: none */ require_once('../lib/nusoap.php'); $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : ''; $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : ''; $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : ''; $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : ''; $client = new soapclient('https://arcweb.esri.com/services/v2/AddressFinder', false, $proxyhost, $proxyport, $proxyusername, $proxypassword); $err = $client->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } $result = $client->call('getVersion', array(), 'http://arcweb.esri.com/v2', 'getVersion'); if ($client->fault) { echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; } else { $err = $client->getError(); if ($err) { echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else { echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } } echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>'; ?> Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Scott Nichol" <snicholnews@xxxxxxxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Friday, May 21, 2004 9:24 AM Subject: Re: [Nusoap-general] Webservices using https Right now, if phpinfo() shows nothing about cURL, then you will not be able to access a service using SSL. Ingo Fischer submitted a patch a while back to use the cURL executable instead of requiring it to be compiled into PHP, but I have yet to merge these changes. I am attaching his patch, which you may be able to apply to your nusoap.php. You may also want to look in your nusoap.php for the following: // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like // "regular" socket. // TODO: disabled for now because OpenSSL must be *compiled* in (not just // loaded), and until PHP5 stream_get_wrappers is not available. // if ($this->scheme == 'https') { // if (version_compare(phpversion(), '4.3.0') >= 0) { // if (extension_loaded('openssl')) { // $this->scheme = 'ssl'; // $this->debug('Using SSL over OpenSSL'); // } // } // } You could try un-commenting this code. As you can see, it is required that OpenSSL be compiled into PHP, not loaded dynamically. Finally, the samples in CVS includes an SSL client. I am pasting it below in this message. As you will see, there is no difference in the code from a non-SSL client. The use of the https scheme in the URL is what "activates" the use of SSL. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Nergis Kilinç" <nergisk@xxxxxxxxxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Friday, May 21, 2004 4:26 AM Subject: Re: [Nusoap-general] Webservices using https Hello, I would like to consume a web service that uses https via php. I have just learned that I need to use cURL from php. However, I do not have any idea how to do and where to start. My hosting service supports Open SSL but how can I understand that my hosting service has cURL? I call phpinfo() but there is nothing returned related to cURL. I also need simple NUSOAP examples for consuming a web service that uses https. Is there an easier way to solve this problem without using cURL? Thanks... Nergis Kilinç ----- Original Message ----- From: "Scott Nichol" <snicholnews@xxxxxxxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, May 18, 2004 2:43 PM Subject: Re: [Nusoap-general] Webservices using https > Implementing a Web service using SSL is independent of PHP and NuSOAP, but rather is a matter of configuration of your Web server (Apache, IIS, etc.). The procedure for configuring the Web server for SSL is in the Web server documentation. > > To have a NuSOAP client access a Web service that uses SSL requires that cURL be accessed from PHP, which requires the cURL library, which in turn will need OpenSSL, I believe. > > Scott Nichol > > Do not send e-mail directly to this e-mail address, > because it is filtered to accept only mail from > specific mail lists. > ----- Original Message ----- > From: "Srividya Vaidyanathan" <srividya@xxxxxxxxxxxxxx> > To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> > Sent: Tuesday, May 18, 2004 12:53 AM > Subject: [Nusoap-general] Webservices using https > > > Hi, > > We have a Web services application implemented in PHP/NuSOAP . Now we would like to implement web services using https . How do we do it ? Are there some technical references. > > Please help. > > Thanks & Regards, > Srividya V > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id%62&alloc_ida84&opÌk > _______________________________________________ > Nusoap-general mailing list > Nusoap-general@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/nusoap-general ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id?66&op=ick _______________________________________________ Nusoap-general mailing list Nusoap-general@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/nusoap-general ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id?66&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: WSDL: 00112, Scott Nichol |
|---|---|
| Next by Date: | Please help me on NuSoap: 00112, Pothapragada Siddartha |
| Previous by Thread: | Re: Webservices using httpsi: 00112, Scott Nichol |
| Next by Thread: | NuSOAP does not return XML attribute to array: 00112, Chhai Thach |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |