1
votes

I have to access netsuite wsdl. I have downloaded php toolkit given by the netsuite team in the following url http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml

I have enabled php_openssl & php_soap extension.

When I access the https://webservices.netsuite.com/wsdl/v2018_2_0/netsuite.wsdl url it shows Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from . When I access the url from browser, wsdl is loading so no firewal blocking

I tried the following options

    // Option 1
$options['stream_context'] = stream_context_create(array(
        'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
        )
));
// Option 2
$options['stream_context'] = stream_context_create([
        'ssl' => [
                'crypto_method' =>  STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,

        ],
     ]);
//Option 3 
$context = stream_context_create(
    [
        'ssl' => [
            'ciphers' => 'DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:KRB5-DES-CBC3-MD5:KRB5-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DES-CBC3-MD5:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:RC2-CBC-MD5:KRB5-RC4-MD5:KRB5-RC4-SHA:RC4-SHA:RC4-MD5:RC4-MD5:KRB5-DES-CBC-MD5:KRB5-DES-CBC-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:DES-CBC-MD5:EXP-KRB5-RC2-CBC-MD5:EXP-KRB5-DES-CBC-MD5:EXP-KRB5-RC2-CBC-SHA:EXP-KRB5-DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC2-CBC-MD5:EXP-KRB5-RC4-MD5:EXP-KRB5-RC4-SHA:EXP-RC4-MD5:EXP-RC4-MD5',
        ],
    ]); 

Disabled wsdl_cache also

But nothing seems to work. Let me know how to access it what are the parameters i have to set in soapclient

1
If you're using the toolkit, there's no need to use SoapClient or the WSDL directly at all. Check out the samples for example usage. - Chris White

1 Answers

0
votes

Adding http_proxy and http_port solved the issue. In browser , we have configured the proxy and port hence wsdl has loaded.