我必须访问netsuite wsdl。我已经在以下网址http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml
中下载了netsuite团队提供的php toolkit
我已启用php_openssl和php_soap扩展名。
当我访问https://webservices.netsuite.com/wsdl/v2018_2_0/netsuite.wsdl网址时,它显示 致命错误:未捕获的SoapFault异常:[WSDL] SOAP错误:解析WSDL:无法从加载。当我从浏览器访问该URL时,wsdl正在加载,因此没有firewal阻止
我尝试了以下选项
// 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',
],
]);
也禁用了wsdl_cache
但是似乎没有任何效果。让我知道如何访问它,我必须在soapclient中设置哪些参数
答案 0 :(得分:0)
添加http_proxy和http_port可以解决此问题。在浏览器中,我们配置了代理和端口,因此wsdl已加载。