PHP :: SoapClient而不是Zend_Soap_Client(Zend Server with Zend Framework Version 1.10.7)

时间:2013-03-15 18:03:15

标签: zend-framework soap-client zend-server zend-server-ce

我的所有SOAP调用都在PHP CORE中成功运行(当我在WAMP中运行它们时)。但是,当我尝试将相同的代码添加到Zend Server时,出于某种原因它会说"服务器遇到内部错误"。 不确定发生了什么! 使用SoapClient()的通话根本不起作用...... 我正在使用Alchemy提供的本地WSDL和本地肥皂服务。 无论如何,我也尝试了同样的Zend_Soap_Client,但是,它仍然无法工作! 这是Zend Soap Client创建的转储:

object(Zend_Soap_Client)#37 (29) { ["_encoding":protected]=> string(5) "UTF-8" ["_classmap":protected]=> NULL ["_faultExceptions":protected]=> array(0) { } ["_soapVersion":protected]=> int(2) ["_uri":protected]=> NULL ["_location":protected]=> NULL ["_style":protected]=> NULL ["_use":protected]=> NULL ["_login":protected]=> NULL ["_password":protected]=> NULL ["_proxy_host":protected]=> NULL ["_proxy_port":protected]=> NULL ["_proxy_login":protected]=> NULL ["_proxy_password":protected]=> NULL ["_local_cert":protected]=> NULL ["_passphrase":protected]=> NULL ["_compression":protected]=> NULL ["_connection_timeout":protected]=> NULL ["_stream_context":protected]=> NULL ["_features":protected]=> NULL ["_cache_wsdl":protected]=> NULL ["_user_agent":protected]=> NULL ["_wsdl":protected]=> string(77) "C:\Program Files (x86)\Zend\Apache2\htdocs\C3Nexus\application\WSAlchemy.wsdl" ["_soapClient":protected]=> NULL ["_lastMethod":protected]=> string(0) "" ["_soapInputHeaders":protected]=> array(0) { } ["_permanentSoapInputHeaders":protected]=> array(0) { } ["_soapOutputHeaders":protected]=> array(0) { } ["location"]=> string(29) "http://localhost:3434/Alchemy" 

即使是客户端上的getFunctions()之类的调用也会给我错误。 我做错了什么?

在ZendEnabler.log

中发现了这些错误
[3/15/2013 2:21:55 PM] Error: Read data error - unable to get read result. Code 109.
[3/15/2013 2:21:55 PM] Error: Request for C:/Program Files (x86)/Zend/Apache2/htdocs/SOME/public/index.php: Unable to get the response from PHP process
[3/15/2013 2:21:55 PM] Error: PHP process 9872 from the "application/x-httpd-php" pool has exited with status 255.

网址请求:http://localhost:8089/SOME/public/index.php/NewPatient/load-gsdd-data

因此,

控制器:NewPatient 行动:loadGssdData

我正在写这个动作的肥皂电话。

这有效:

$hey = new Zend_Soap_Client(APPLICATION_PATH . '\WSAlchemy.wsdl');
$hey->location ='http://localhost:3434/Alchemy';
echo var_dump($hey);

但是当我打电话给$hey->getFunctions()时失败了!

这根本不起作用,

$hey = new SoapClient(APPLICATION_PATH . '\WSAlchemy.wsdl');
$hey->location ='http://localhost:3434/Alchemy';
echo var_dump($hey);

甚至是这个!

 $hey = new SoapClient("http://localhost:8089/SOME/public/WSAlchemy.wsdl");
 echo var_dump($hey);

注意:我可以在http://localhost:8089/SOME/public/WSAlchemy.wsdl

访问wsdl文件

我想知道为什么我不能在Zend Server中使用SoapClient,这是PHP的核心! :(

要尝试,我在Zend Server中禁用了Soap Client 它说:

[15-Mar-2013 14:46:23] PHP Fatal error:  Class 'SoapClient' not found in C:\Program Files (x86)\Zend\Apache2\htdocs\SOME\application\controllers\GSDD.php on line 2

所以,我再次启用,它说没有错误,但我仍然收到错误! 启用扩展程序后,这是我的服务器访问日志:

127.0.0.1 - - [15/Mar/2013:14:54:06 -0400] "POST /ZendServer/index.php/Log-Tail/Index HTTP/1.1" 200 9205
127.0.0.1 - - [15/Mar/2013:14:54:07 -0400] "POST /ZendServer/index.php?controller=systray&action=exec&do=ping HTTP/1.1" 200 643
127.0.0.1 - - [15/Mar/2013:14:54:35 -0400] "GET /SOME/public/index.php/NewPatient/load-gsdd-data HTTP/1.1" 500 499

所以当我加载时,我得到了这个:

Error

打开该文件后,存在服务器错误。

其他控制器和操作正常运行!我对这个动作有问题。

非常感谢您的时间:)

2 个答案:

答案 0 :(得分:0)

嗯,有一些deje vu。几乎可以肯定的是奇数球端口号... openCM? WSDL是否效仿?尝试使用SoapClient选项'proxy_host''proxy_port'吗?

发现这可能是同一件事:Workaround for PHP SOAP request failure when wsdl defines service port binding as https and port 80?

答案 1 :(得分:0)

好的,最后修好了!

在这个过程中,了解了事情是如何运作的,但是,这是一个愚蠢的理由!

Zend was unable to read the Schema File 就是这样!!!

小问题,p!

对不起,如果这个问题困扰你;)

但是,WSDL和Schema文件必须齐头并进!我怎么会错过这个!

感谢大家查看这些问题!

相关问题