1.使用soap
Php代码
$client = "*****";//(wsdl链接在同一主机上)
1. $client = new soapclient($wsdl);
2. $client = "*****";//(wsdl链接在同一主机上)
3.$client = new soapclient($wsdl);
2.出现错误如下
第一种:
Error代码
1. SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://*****.14:8080/rpc/soap/jirasoapservice-v2?wsdl' : failed to load external entity "http://*****.14:8080/rpc/soap/jirasoapservice-v2?wsdl"
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://*****.14:8080/rpc/soap/jirasoapservice-v2?wsdl' : failed to load external entity "http://*****.14:8080/rpc/soap/jirasoapservice-v2?wsdl"
第二种:(采用nusoap链接方式)
Error代码
1. wsdl error: Getting http://******.14:8080/rpc/soap/jirasoapservice-v2?wsdl - HTTP ERROR: Couldn't open socket connection to server http://******.14:8080/rpc/soap/jirasoapservice-v2?wsdl, Error (13): Permission denied
wsdl error: Getting http://******.14:8080/rpc/soap/jirasoapservice-v2?wsdl - HTTP ERROR: Couldn't open socket connection to server http://******.14:8080/rpc/soap/jirasoapservice-v2?wsdl, Error (13): Permission denied
3.原因:
SELinux 阻止你的 httpd 守护程序与同一台机器上的 LDAP 服务器沟通。
linux下设置:
Linux代码
1. $setsebool -P httpd_can_network_connect on
$setsebool -P httpd_can_network_connect on
转载于:https://my.oschina.net/linxb/blog/1527033