zend-frameworksoap-clientzend-serverzend-server-ce

PHP::SoapClient instead of Zend_Soap_Client in (Zend Server with Zend Framework Version 1.10.7)


I have all my SOAP Calls successfully working in PHP CORE (When I run them in WAMP) . But when I try to just add the same code to Zend Server,for some reason it says "The server encountered an internal error". Not sure what is going on! A call using SoapClient() is not at all working... I am using Local WSDL and local soap service which is given by Alchemy. Anyways,I tried the same with Zend_Soap_Client too,but still,it doesn't work!! Here is the dump of Zend Soap Client created :

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" 

Even a call like getFunctions() on the client is giving me the error. What am I doing wrong?

Found these errors in 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.

Url Request : http://localhost:8089/SOME/public/index.php/NewPatient/load-gsdd-data

Hence,

Controller : NewPatient Action : loadGssdData

I am writing soap call in that action.

This works:

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

But fails when I call $hey->getFunctions() !

This doesn't work at all,

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

or even this!

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

Note: I can access the wsdl file at http://localhost:8089/SOME/public/WSAlchemy.wsdl

I wonder why I can't use SoapClient in Zend Server,which is core PHP one !! :(

To try,I disabled Soap Client in Zend Server It said :

[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

So,I enabled again,it says no error there,still I get error! This is my server access log after enabling the extension :

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

So when I load I get this :

Error

After I open that file,there is server error in there.

Other controllers and actions are working fine! I just have problem with this action.

Thanks a lot for your time :)


Solution

  • Alright,fixed it finally!

    In the process,learned how things work,but,lol it is a silly reason!

    Zend was unable to read the Schema File That is it!!!

    Small issue,phew!

    Sorry if this question troubled you ;)

    But yeah WSDL and Schema file must go hand in hand! How did I miss this!

    Thanks to all for viewing this questions!