欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

第一次做soap接口,出现了问题,求大神指导

程序员文章站 2024-02-19 10:00:46
...
Warning: SoapClient::SoapClient(http://192.168.1.198:8008/) [function.SoapClient-SoapClient]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
in C:\wamp\www\ITServer_v1.21n\include\ETSoap.php on line 17



Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "http://192.168.1.198:8008/" in C:\wamp\www\ITServer_v1.21n\include\ETSoap.php on line 17



Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.1.198:8008/' in C:\wamp\www\ITServer_v1.21n\include\ETSoap.php:17
Stack trace:
#0 C:\wamp\www\ITServer_v1.21n\include\ETSoap.php(17): SoapClient->SoapClient('http://192.168....')
#1 C:\wamp\www\ITServer_v1.21n\test.php(3): ETSoap->__construct()
#2 C:\Users\duzhengwei\AppData\Local\Temp\dummy.php(1): include('C:\wamp\www\ITS...')
#3 {main}
thrown in C:\wamp\www\ITServer_v1.21n\include\ETSoap.php on line 17


表示错误没看懂!


回复讨论(解决方案)

输出phpinfo(),看看soap模块是否有问题

输出phpinfo(),看看soap模块是否有问题


恩,然后呢?soap怎么才算是有问题?

failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
打开失败:HTTP请求失败!HTTP / 1.1 500内部服务器错误

显然是您的服务端出现了问题

去检查C:\wamp\www\ITServer_v1.21n\include\ETSoap.php 的17行 soap 没有调用成功,加一个输出看看 应该是提交给soap的数据格式和soap要求的格式不相符

问题解决了,没找到接口文件。

去检查C:\wamp\www\ITServer_v1.21n\include\ETSoap.php 的17行 soap 没有调用成功,加一个输出看看 应该是提交给soap的数据格式和soap要求的格式不相符


failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
打开失败:HTTP请求失败!HTTP / 1.1 500内部服务器错误

显然是您的服务端出现了问题


恩,是的