soap调用api时报错

gongsl 发布于 2014/08/04 16:26
阅读 432
收藏 0
PHP
Warning : SoapClient::SoapClient(http://**/am5/soap/auth?wsdl) [ soapclient.soapclient ]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in  C:\Program Files (x86)\vtigercrm-5.4.0\apache\htdocs\vtigerCRM\xmlrpc\soap.php  on line  3

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://**/am5/soap/auth?wsdl" in C:\Program Files (x86)\vtigercrm-5.4.0\apache\htdocs\vtigerCRM\xmlrpc\soap.php on line 3

当我运行一下代码时出现以上错误:

<?php
$authnSvc = new SoapClient("http://localhost:8080/am5/soap/auth?wsdl");
$querySvc = new SoapClient("http://localhost:8080/am5/soap/query?wsdl");

echo '<pre>';
print_r($authnSvc->__getFunctions());
print_r($authnSvc->__getTypes());
print_r($querySvc->__getFunctions());
print_r($querySvc->__getTypes());
?>

求高手解答谢谢!

加载中
0
gongsl
gongsl
求解答!
0
yunfound
yunfound
该链接: http://localhost:8080/am5/soap/query?wsdl 能正常访问吗?
0
gongsl
gongsl

引用来自“yunfound”的评论

该链接: http://localhost:8080/am5/soap/query?wsdl 能正常访问吗?
http://localhost:8080/am5能访问到页面,但是 http://localhost:8080/am5/soap/query?wsdl访问不到哎
0
yunfound
yunfound

引用来自“yunfound”的评论

该链接: http://localhost:8080/am5/soap/query?wsdl 能正常访问吗?

引用来自“gongsl”的评论

http://localhost:8080/am5能访问到页面,但是 http://localhost:8080/am5/soap/query?wsdl访问不到哎

所以就报错了,请先把WebService的服务端调通再说!!!

起码你访问该地址要能够输出xml!

返回顶部
顶部