Index: sandbox/webservice/api/adapters/ExpressoAdapter.php
===================================================================
--- sandbox/webservice/api/adapters/ExpressoAdapter.php	(revision 6149)
+++ sandbox/webservice/api/adapters/ExpressoAdapter.php	(revision 6149)
@@ -0,0 +1,125 @@
+<?php
+class ExpressoAdapter extends Resource {
+
+	private $expressoVersion;
+	private $request;
+	private $params;
+	private $result;
+	private $error;	
+	private $id;
+	
+	function __construct($id){
+		$GLOBALS['phpgw_info'] = array(
+				'flags' => array(
+						'currentapp'        	=> 'login',
+						'noheader'              => True,
+						'disable_Template_class' => True
+				)
+		);
+		
+		include_once('../../header.inc.php');
+		$this->expressoVersion = substr($GLOBALS['phpgw_info']['server']['versions']['phpgwapi'],0,3);			
+	}
+	
+	protected function setRequest($request){
+		$this->request = $request;
+	}
+	
+	public function getRequest(){
+		return $this->request;
+	}
+	
+	protected function getExpressoVersion(){
+		return $this->expressoVersion;
+	}
+	
+	protected function setResult($result){
+		$this->result = $result;
+	}
+	
+	public function getResult(){
+		return $this->result;
+	}
+	
+	protected function setId($id){
+		$this->id = $id;
+	}
+	
+	public function getId(){
+		return $this->id;
+	}
+	
+	protected function setParams($params){		
+		$this->params = $params;
+	}
+	
+	public function getParams(){	
+		return $this->params;
+	}
+	
+	public function getParam($param){
+		return $this->params->$param;
+	}
+	
+	public function setError($error) {
+		$this-> error = $error;
+	}
+	
+	protected function getError() {
+		return $this-> error;
+	}
+	
+	public function post($request){
+		$this->setRequest($request);		
+		parse_str($request->data, &$array);		
+		$data = (object)$array;		
+		if($data){
+			if($data->params){								
+				$this->setParams(json_decode($data->params));
+			}
+			if($data->id)
+				$this->setId($data->id);
+		}
+	}	
+	
+	public function get($request){
+		$response = new Response($request);
+		$response->code = Response::OK;
+		$response->addHeader('content-type', 'text/html');		
+		$response->body = "<H4>Metodo GET nao permitido para este recurso.</H4>";		
+		return $response;
+	}
+	
+	public function getResponse(){
+		$response = new Response($this->getRequest());
+		$response->code = Response::OK;
+		$response->addHeader('content-type', 'application/json');
+
+		if($this->getId())
+			$body['id']	= $this->getId();
+		if($this->getResult())
+			$body['result']	= $this->getResult();
+		else
+			throw new ResponseException("",Errors::E_UNKNOWN_ERROR);
+		
+		$response->body = json_encode($body);
+		
+		return $response;
+	}
+	
+	protected function isLoggedIn(){
+		if($this->getParam('auth') != null) {
+			list($sessionid, $kp3) = explode(":", $this->getParam('auth'));
+			if($GLOBALS['phpgw']->session->verify($sessionid, $kp3)){									
+				return $sessionid;
+			}
+			else{
+				throw new ResponseException("",Errors::LOGIN_AUTH_INVALID);
+			}
+		}
+		else{
+			throw new ResponseException("",Errors::LOGIN_NOT_LOGGED_IN);
+		}		
+	}	
+			
+}
Index: sandbox/webservice/api/adapters/CatalogAdapter.php
===================================================================
--- sandbox/webservice/api/adapters/CatalogAdapter.php	(revision 6148)
+++ sandbox/webservice/api/adapters/CatalogAdapter.php	(revision 6149)
@@ -2,5 +2,5 @@
 
 
-class CatalogAdapter extends Expresso {	
+class CatalogAdapter extends ExpressoAdapter {	
 	private $minArgumentSearch;
 	private $userId;
Index: sandbox/webservice/api/adapters/MailAdapter.php
===================================================================
--- sandbox/webservice/api/adapters/MailAdapter.php	(revision 6148)
+++ sandbox/webservice/api/adapters/MailAdapter.php	(revision 6149)
@@ -1,5 +1,5 @@
 <?php
 
-class MailAdapter extends Expresso {
+class MailAdapter extends ExpressoAdapter {
 	protected $defaultFolders;
 	protected $imap;
