Re: HTTPS with NuSOAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, March 22, 2006 1:41 am, Peter Lauri wrote:
> 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');

The 's' in 'https' should be all that nuSOAP would need to know that
it should use SSL, if nuSOAP can do that.

> $login_info = array('passport'=>array(
>
> 'email'=>'myemail',
>
> 'password'=>'mypassword',
>
> 'account'=>'theaccountnumber',
>
> 'role internalId="theinternalid"'=>''));

Does that work to set the attribute?

> $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

I have to wonder how the namespace tempuri.org got involved...

> |
>
> |
>
> |
>
>
>
>     [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

This sounds to me like you've managed to use https/SSL, and are "in"
to the point of logging in, but something has convinced nuSOAP and/or
the WSDL that it should be using POST somewhere, and the server that's
handling the request don't like POST...

So maybe your question is how to get nuSOAP to use GET instead of POST.

Just guessing...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux