Fordnox

Life is about trust

Subscribe to Fordnox
Technorati
del.icio.us
November-13-08

Zend Framework Soap server

posted by Andrius

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 ?

  1. Vladimir Said,

    $result = new stdClass();
    $result->product_id = “2″;
    $result->title = “Product Title”;
    return $result;

  2. Andrius Said,

    Thanks Vladimir, tomorrow i will try this, and post my results

  3. Andrius Said,

    Yes, that helped

Add A Comment