HTTPS with NuSOAP
| From: | Peter Lauri | Date: | Wed, 22 Mar 2006 07:41:52 +0000 |
| Subject: | HTTPS with NuSOAP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232395@lists.php.net to get a copy of this message | ||
Hi,
I am trying to use a Web Service on the following endpoint
https://webservices.netsuite.com/wsdl/v1_3_1/netsuite.wsdl.
As seen in the
url, it is under HTTPS. I have compiled PHP with CURL and verified that CURL
is working. In the documentation for NuSOAP I can not find how I set the
soapclient to transmit via HTTPS.
This is my code:
<?php
require_once('nusoap/lib/nusoap.php');
$soapclient = new
soapclient('https://webservices.netsuite.com/wsdl/v1_3_1/netsuite.wsdl');
$login_info = array('passport'=>array(
'email'=>'myemail',
'password'=>'mypassword',
'account'=>'theaccountnumber',
'role internalId="theinternalid"'=>''));
$soapclient->call('LoginRequest', $login_info);
echo '<pre>';
print_r($login_info);
print_r($soapclient);
echo '</pre>';
?>
The full dump of the soapclient can be seen on
http://devdws.com/soap/error.htm. This are parts of
the dump that I think is
valuable in solving this problem:
----------------
[error_str] => HTTP Error: Unsupported HTTP response status 405 Method
Not Allowed (soapclient->response has contents of the response)
[debug_str] => 2006-03-22 10:56:25.644147 soapclient: instantiate SOAP
with endpoint at https://webservices.netsuite.com/wsdl/v1_3_1/netsuite.wsdl
2006-03-22 10:56:25.644283 soapclient: call: operation=LoginRequest,
namespace=http://tempuri.org, soapAction=, rpcParams=, style=rpc,
use=encoded, endpointType=soap
|
|
|
[response] => HTTP/1.1 405 Method Not Allowed
Date: Wed, 22 Mar 2006 03:56:26 GMT
Server: Oracle-Application-Server-10g
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent
Content-Length: 152
Cache-Control: private
Content-Type: text/html
405 Method Not Allowed
HTTP method POST is not supported by this URL
[responseData] =>
[cookies] => Array
(
)
[decode_utf8] => 1
[operations] => Array
(
)
[fault] =>
[faultcode] =>
[faultstring] =>
[faultdetail] =>
[operation] => LoginRequest
[opData] => Array
(
)
----------------
Best regards,
Peter Lauri