简体   繁体   English

使用php soapclient工具箱访问netsuite wsdl显示无法加载wsdl

[英]Accessing netsuite wsdl using php soapclient toolkit shows couldn't load wsdl

I have to access netsuite wsdl. 我必须访问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 我已经在以下网址中下载了netsuite团队提供的php toolkit :http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml

I have enabled php_openssl & php_soap extension. 我已经启用了php_openssl和php_soap扩展。

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 . 当我访问https://webservices.netsuite.com/wsdl/v2018_2_0/netsuite.wsdl网址时,它显示致命错误:未捕获的SoapFault异常:[WSDL] SOAP-ERROR:解析WSDL:无法从加载 When I access the url from browser, wsdl is loading so no firewal blocking 当我从浏览器访问URL时,wsdl正在加载,因此没有firewal阻止

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 也禁用了wsdl_cache

But nothing seems to work. 但是似乎没有任何作用。 Let me know how to access it what are the parameters i have to set in soapclient 让我知道如何访问它我必须在soapclient中设置哪些参数

Adding http_proxy and http_port solved the issue. 添加http_proxy和http_port解决了该问题。 In browser , we have configured the proxy and port hence wsdl has loaded. 在浏览器中,我们配置了代理和端口,因此wsdl已加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM