[英]No response of SOAP connection with PHP
I am trying to establish a SOAP connection between a client and a server. 我正在尝试在客户端和服务器之间建立SOAP连接。
First in the Client, I send through a .php file information with soap so I can see the request and response: 首先,在客户端中,我使用肥皂发送.php文件信息,以便可以看到请求和响应:
&client = new SOAPclient("http://.../service.wsdl",array('soap_version' => SOAP_1_1,'trace'=>1);
After this I call the function &client->handle_request(&request)
之后,我调用函数
&client->handle_request(&request)
So far everithing works fine. 到目前为止,一切正常。
I call the server from the wsdl file http://..../index.php?soap=on
我从wsdl文件
http://..../index.php?soap=on
调用服务器
if (soap == on)
{
include server.inc
&soapserver = new Juan_soap_server
&soapserver->handle_request($request)
}
in the server.inc I have defined the class Juan_soap_server
and the function handle_request
. 在server.inc中,我定义了类
Juan_soap_server
和函数handle_request
。
My problem is that the programm executes the function handle_request
, does all their task but after that I get no response in my client. 我的问题是程序执行了
handle_request
函数,完成了所有任务,但是之后我的客户端没有任何响应。
I have run a simple client server test in the server and it works properly so is not a problem with the soap installation. 我已经在服务器中运行了一个简单的客户端服务器测试,它可以正常工作,所以soap安装不是问题。
Do you have any clue? 你有什么线索吗?
Per my experience, when this happened to me in the past, was that the object i was returning didn't math the structure of the type or complextype defined in the web service definition (wsdl) file. 根据我的经验,当我过去发生这种情况时,就是我返回的对象没有计算Web服务定义(wsdl)文件中定义的类型或复杂类型的结构。
I would recommend you to change the return type to string and just return a simple string from the server side. 我建议您将返回类型更改为字符串,然后仅从服务器端返回一个简单的字符串。 If this work, then younare sure that is something with the data structure that you are returning.
如果这项工作有效,那么您将确保您所返回的数据结构中存在某种东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.