Note that there are some explanatory texts on larger screens.

plurals
  1. POno result, web services
    primarykey
    data
    text
    <p>I need to develop a simple SOAP service which just allow client to invoke its method and get a string value, I have the followings files on PHP ZEND Framework, once I go to this address >>> <a href="http://localhost/Zend/MyProject/library/client.php" rel="nofollow">http://localhost/Zend/MyProject/library/client.php</a> the result is >> ID:&lt;&lt;&lt; I am using MAMP , please help me to sort it out , thanks</p> <pre><code>&lt;?php class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { $this-&gt;getHelper('viewRenderer')-&gt;setNoRender(true); // initialize server and set URI $server = new Zend_Soap_Server(null, array('uri' =&gt; 'http://localhost/Zend/MyProject/public/index')); // set SOAP service class $server-&gt;setClass('Example_Manager'); $server-&gt;setObject(new Example_Manager()); // handle request $server-&gt;handle(); //$request = $server -&gt;getLastRequest(); } } ?php class Example_Manager { /** * Returns list of all products in database * * @return array */ public function getProducts($name) { return “Product" .$name //should be without semicolon } } ?&gt; &lt;?php // load Zend libraries require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Soap_Client'); try { // initialize SOAP client $options = array( 'location' =&gt; 'http://localhost/Zend/MyProject/public/index/', 'uri' =&gt; 'http://localhost/Zend/MyProject/public/index/', ); $client = new Zend_Soap_Client(null, $options); $id = $client-&gt;getProducts("Here"); print_r($id); echo "ID:" .$id. "&lt;&lt;&lt;"; } catch (SoapFault $s) { die('ERROR: [' . $s-&gt;faultcode . '] ' . $s-&gt;faultstring); } catch (Exception $e) { die('ERROR: ' . $e-&gt;getMessage()); } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload