Posts Tagged ‘soap’

ZF 1.8 Soap server example module

6 Comments »

I want to share my example Zend Soap Server module. This is Zend Framework module, with default folders structure. You can just drop it your “modules” directory and server will be ready for work.
My aim was to show how Service documentation is made “on the fly”. You only need to change DocBlock in service class. Fully working documentation will be generated by reflection class.

Some things worth mentioning:

  • I have left ini_set(“soap.wsdl_cache_enabled”, “0″); because $server->setWsdlCache(false); does nothing
  • Authentication example is for demo only and should not be considered as proposed solution.

Read the rest of this entry »


Zend Framework Soap server

3 Comments »

Thanks for great explanation Viktorai Agejevai

Server class has function:

/**
* @desc Get Product info by product_id
* @param int $product_id
* @return array
*/
public function getProduct($product_id)
{
	$result = array(
		"product_id"=>$product_id,
		"title"=>'Product Title'
		);
	return $result;
}

Client get response:


	
	  product_id
	  2
	
	
	  title
	  Product Title
	

I want this response to be like this:


	
2
		
	

How do i do that ?