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

php soap有关问题 跪求高手解答…

程序员文章站 2024-01-02 15:27:34
...
php soap问题 跪求高手解答……!!
server端:
PHP code
"http://test-rui"));function sayhello($str){    return "Hello ".$str;}$server->addFunction('sayhello');$server->handle();?>


client端:
PHP code
"http://localhost/php webservice/server.php",'uri'=>"http://test-rui"));    $client->sayhello("Jim");}catch (SoapFault $fault){    echo "fault code:".$fault->faultcode."
". "fault string : ".$fault->faultstring;}?>


为啥客户端运行时会报错:Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in D:\PHPWeb\php webservice\client.php:6 Stack trace: #0 [internal function]: SoapClient->__doRequest('__call('sayhello', Array) #2 D:\PHPWeb\php webservice\client.php(6): SoapClient->sayhello('Jim') #3 {main} thrown in D:\PHPWeb\php webservice\client.php on line 6

用try catch 后 得到这个:
fault code:HTTP
fault string : Not Found
还有 能不能给我详细介绍下soapserver 跟soapclient方法里的那个array参数到底是怎么用的啊 ??
求高人帮助!!!

------解决方案--------------------
server端有个wsdl文件,怎么没有?
php soap有关问题  跪求高手解答…

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


上一篇:

下一篇: