Print Friendly

SOAP implemented by tuOtempO to leverage reservation applications develops the possibility to use tuOtempO ASP as a Web Interface for client’s application, as a Gateway for multichannel communications, as a reservation Engine to the client’s catalogue of resources.

Table of Contents

WSDL

URL to the wsdl:

https://app.tuotempo.com/soap.php?wsdl

Entity List

Through tuOtempO SOAP layer it is possible to update and query the following entities, involved in any standard reservations processes.

Web Interface for client’s application
USER cutomers, patients, etc..
RESOURCE reservable resources (doctors, rooms, ecc..)
ACTIVITY resource’s reservable activities (treatments, dental hygiene, etc..)
RESERVATION Appointments
RECALLS Preventive maintenance appointments
Gateway for multichannel communications
MESSAGE Messages (sms, mms, email, fax, voice)
Reservation Engine to the client’s catalogue of resources
AVAILABILITY reservable time slots for the choosen resource and chosen activity duration

Table 1 : Entity Parameters

Lists the above entities’ parameters.

User

Parameters Description Type Example Data
REQUIRED action action to do over this object (add|update|delete) string update
userid patient’s id in tuotempo database string sc236781713gh2
password password to login string hjk34er8
fname first name string Emanuele
lname last name string Luchetti
REQUIRED phone mobile (or landline) number string 393408374210
institution string Tuotempo
position SUPERADMIN/ADMIN/OPERATOR/CUSTOMER string OPERATOR
communication allowed communications (all|sms|email) string All
privacy privacy consent int 1
address string via s. soprani 5
cp or zip code string 60022
city string Castelfidardo
province or state string Ancona
country string italy
hometel landline number string 390717822162
worktel work number string 390719797170
custom1 string 39071780682
custom2 string
custom3 string
REQUIRED legacyid unique identifier in client’s application DB string AGF345
language language (it,es,en) string it
tname third name string De Compostela
idnumber Identification Number -> Document Number string LCHMNL71H23A271R
gender ‘F’ or ‘M’ string M
subscription Insurance subscription number string 1AD2327389
expiration expiration’s timestamp string 13626353627
resourceid Personal Doctor’s ID string sc3434789d

Resource

Parameters Description Type Example Data
REQUIRED action action to do over this object (add|update|delete) string Update
typologyids reservable activities’ unique identifiers (or names) array (strings) Array(’1′,’2′,’3′)
areaids resource’s areas of activity or working places unique identifiers (or names) array (strings) Array(‘Cardiologia’,'Generale’)
scheduleids working schedules unique identifiers (or names) array (strings) Array(‘HJK4678′)
REQUIRED name complete Name string Riccardo Fanelli
location Address string via Garibaldi 3, Bologna
rphone Contact phone number string 393396546765
notes string Solo privato
status ‘a’ tuotempo sends communications to customers of this resource’s appointments, ‘u’ doesn’t send communications string A
minRes deprecated int 0
maxRes deprecated int 0
isHidden 0 if we want this resource to be visible from the external customers web reservation page (if activated) int 0
email string r.fanelli@gmail.com
dayOffset deprecated int 0
custom1 string
custom2 string
custom3 string
REQUIRED legacyid unique identifier in client’s application DB string HJK4678
address string via s. soprani 5
cp or zip code string 60022
city string Castelfidardo
province or state string Ancona
country string italy
activity_prices prices for activities (should have the same order than typologyids) Array(’100′,’2’00,’300′)
activity_durations durations for activities (should have the same order than typologyids) Array(’10′,’20′,’30′)

Reservation

Parameters Description Type Example Data
REQUIRED action action to do over this object (add|update|delete) string update
resid Reservation’s ID in tuotempo Database string sc347348938434hgdfh
REQUIRED resourceids related resources’ unique identifiers array (strings) Array(HGHJ456)
REQUIRED userids related customers’ unique identifiers array (strings) Array(JKL678)
activityid related activity’s unique identifier string VBNM767
REQUIRED start_date (dd/mm/yyyy) string 12/07/2008
REQUIRED startTime (hh:mm) string 12:00
endTime (hh:mm) (default 15 minutes) string 13:00
parentid deprecated string
summary notes string should bring Blood tests
recall how many days this appointment should be repeated by the customer (dental hygiene every 6 months: 180) int 180
custom0..custom9 optional personalised futher parameters string
REQUIRED legacyid unique identifier in client’s application DB string FHJK234
checkQuery query to check if the slot to reserve is still available string SELECT * FROM reservas WHERE fecha = ’12/12/2010′ AND HorarioInicio <= ’15:30′ AND HorarioFin >= ’15:30′ AND doctorId = ’1523′
is_pending 0 if approved, 1 if to_approve, 3 if cancelled by user string
areaTitle related area of activity or working place description string
activityTitle related activity description string
typologyTitle related group of activities description string
resourceName related resource complete Name string
creatorid string
creatorName string
fname Patient’s first name string
lname Patient’s second name string
tname Patient’s third name string
insuranceid string
app_action string
app_lid string
user_email reservation patient’s email address string carletti@gmail.com
user_phone reservation patient’s mobile phone number string 393408374210
user_birthday string
user_idnumber string
user_gender string
user_zipcode string
user_country string
user_city string
user_province string
user_address string
user_privacy string
user_subscription string
user_expiration string
user_hometel reservation patient’s landline phone number string 390514210511
user_worktel string
user_position string
user_language string

Recall

Parameters Description Type Example Data
REQUIRED action action to do over this object (add|update|delete) string Update
REQUIRED resourceids related resources’ unique identifiers array (strings) Array(JKL678)
REQUIRED userids related customers’ unique identifiers array (strings) Array(JKL678)
activityid related activity’s unique identifier string VBNM767
REQUIRED start_date (dd/mm/yyyy) string 12/07/2008
summary notes string he had a urgent matter
custom1..custom3 optional personalised futher parameters string
REQUIRED legacyid unique identifier in client’s application DB string FHJK234

Activity

Parameters Description Type Example Data
REQUIRED action action to do over this object (add|update|delete) string Update
activityTitle activity description string Visita di controllo
duration int 30
price int 120
comments notes string É necessario portare le analisi
typologyid belonging group unique identifier string 3
typologyTitle belonging group description string Medicina generale
recall adviced days interval to next appointment of the same activit int 180
custom1 string
custom2 string
custom3 string
REQUIRED legacyid unique identifier in client’s application DB string VBNM767
description alternative description for the activit (if showDescription = 1 it will be shown in the reservation page) string
showDescription show alternative description or not int

Message

Parameters Description Type Example Data
REQUIRED action action to do over this object (“add” sends the message |”delete” aborts the message if not sent yet) string Add
REQUIRED to receiver address (mobile, email, landline, fax) string 393396546765
REQUIRED userid alternative to “to”: receiver unique identifier, previously added by method updateUsers string JHGDHJ6567
REQUIRED channel transport media (“sms”|”email”|”voice”|”fax”|”mms”) string sms
subject only for email and mms
type body type (“text”|”html”) string text
REQUIRED body for sms if > 160 (> 70 in case of UNICODE body) characters will cause messages concatenation string Salve, le ricordiamo che il centro resterá chiuso durante il mese di agosto
from message sender (phone number including international prefix or 11 characters alphanumeric text for SMS, sender name for Email). For SMS messages phone number will be necessary to receive answers. string 393408448626
attachment_filename Attachment File Name, useful to specify the attachment file type (by its extension). Such file will be stored temporarily inside tuotempo server. string Map.gif
attachment_content attached file content, it should be included in this field in its row format even if this field is a string type base64Binary GIF89a` ` ÷ ÿÿÿÿÿ÷ÿÿæ÷ÿÿÿÿï÷ÿ÷ÿÿÖþÿÞÿÿÉþÿ½ÿ÷ÿÿÿ°ÿ÷÷÷÷÷…..
READ ONLY sendingtime string 12:00
READ ONLY sendingdate string 12/07/2008
READ ONLY received message has been delivered to receiver? (1|0) string 0
READ ONLY status message status detailed information string Received by recipient
READ ONLY answer receiver’s answer to the message, it can be used to retreive messages according to their answer: ” -> all messages, ‘*’ -> only answered messages,’string’ -> messages whose answer contains ‘string’ (case insensitive) . string No
READ ONLY credits number of tuotempo credits used by this message string 1
custom1 string
custom2 string
custom3 string
legacyid unique identifier in client’s application DB (if omitted a random one will be generated by tuotempo) string HGHJ675

availabilitiesSearchObject

Parameters Description Type Example Data
resourceName availabilities’ resource name (if only one) string Fanelli
resourceids resources’ tuotempo unique identifiers array (strings) array(‘sc646378276′,’sc76473876772′)
resource_legacyids resources’ unique identifiers in client’s application DB array (strings) array(’122′,’133′)
activityTitle activity description string Ecografia Addome Ovarica
activityid activity’s tuotempo unique identifier string sc67436738764
activity_legacyid activity’s unique identifier in client’s application DB string 188
areaid resource’s areas of activity or working places tuotempo unique identifier string sc463748376788
area_legacyid resource’s areas of activity or working places unique identifier in client’s application DB string Cardiologia
duration time interval of the availability (if filled it overrides the activity duration stored in tuotempo db) string 45
minTime starting time of the day to retrieve availabilities string 12:00
maxTime ending time of the day to retrieve availabilities string 17:00
start_date starting date to retrieve availabilities string 17/12/2010
end_date ending date to retrieve availabilities string 23/12/2010
price deprecated string
maxResults number of availabilities to retrieve int 5
minResultsPerResource minimum number of availabilities per resource specified in the resource_legacyids or in the resourceids arrays int 1
nextResults pager field: it is a serialized string representing parameters to obtain the next maxResults availabilities (this string is returned by each search result and you can just use it in this field ) next search starting date timestamp::next search page::third parameter is too difficultbut remember this field should be used as it is returned by last search string 125634535365::2:10

Soap Location

The above listed entities can be updated, inserted and deleted, and in most cases queried, by the SOAP methods described in TABLE 2, which is available at the URL:

https://app.tuotempo.com/soap.php

Methods related to the former 4 entities have been implemented merely for the synchronization with preexisting client’s reservation softwares and e-agendas.

Methods related with the Messages entity are intended for the use of tuotempo as a pure Gateway for the sending of messages and for their further retrieval.

Methods of Insertion, modification and deletion are all characterized by the prefix update (updateResources, etc.), while the methods enabling the retrieval of all entities which have been modified or added within tuOtempO are characterized bi the prefix get (getUsers, etc..). Methods for the retrieval of entities according to their attributes or a search string are distinguished by the prefix search.

The getMethods exist only for some of the entities, all entities which can be created, deleted or modified within tuotempo, or whose properties can change once they are stored in tuotempo database as a result of tuotempo operations on them, as an example if a User’s phone number is changed by the tuotempo administrator the getUsers method will return that User with an ‘update’ action.

Added, modified and deleted entities retrieval methods Explanation
getUsers Customers data can be modified by the customer himself when he owns an account to reserve online.
getReservations Appointments can be created, modified or deleted by the customer himself when he is provided with an account for online reservations. Reservations can be also modified by the reception of customers’ communicaitons (e.g.: a cancellation SMS).
getMessages Messages attributes can be updated for example by the evolution of their delivery status, or by the reception of an answer by the receiver. This method provides the way to get the list of all messages that have been updated after they have been sent. Any updated mesages can only be retrieved by this method once. After the querying of a message it will be flagged as ‘queried’ by tuotempo and to get infos about it you’ll have to use the searchMessages method.

Table 2 : SOAP methods

updateUsers

Parameters Description Type Example
updateUsers Sends an array of users to add, update or delete returns: array(array(legacyid1,result1,msg1), array(legacyid2,result2,msg2),….) array(array(ERUI2322,OK,A new user has been added), array(HJK567,ERROR,User couldn’t be added, Name is REQUIRED),………….)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
REQUIRED ARRAY OF USERS An array of 1 or more users, each one in the form of the entity described in TABLE 1 array(users)
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

getUsers

Parameters Description Type Example
getUsers returns an array of userswhich have been added, updated or deleted online returns: array(users)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

updateResources

Parameters Description Type Example
updateResources Sends an array of resources to add, update or delete returns: array(array(legacyid1,result1,msg1), array(legacyid2,result2,msg2),….) array(array(ERUI2322,OK,A new resource has been added), array(HJK567,ERROR,the resource hasn’t been added, name is REQUIRED),……….)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
REQUIRED ARRAY OF RESOURCES An array of 1 or more resources, each one in the form of the entity described in TABLE 1 array (resources)
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

updateReservations

Parameters Description Type Example
updateReservations Sends an array of reservations to add, update or delete. returns: array(array(legacyid1,result1,msg1), array(legacyid2,result2,msg2),….) array(array(ERUI2322,OK,Una nuova prenotazione é stata aggiunta),array(HJK567,ERROR,la prenotazione non é stata aggiunta – manca la data),………….)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
REQUIRED ARRAY OF RESERVATIONS An array of 1 or more reservations, each one in the form of the entity described in TABLE 1 array (reservations)
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

getReservations

Parameters Description Type Example
getReservations Returns an array of reservations which have been added, updated or deleted online returns: array(reservations)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

updateRecalls

Parameters Description Type Example
updateRecalls Sends an array of recalls to add, update or delete. returns: array(array(legacyid1,result1,msg1), array(legacyid2,result2,msg2),….) array(array(ERUI2322,OK,Un nuovo richiamo é stato aggiunto),array(HJK567,ERROR,il tuo richiamo non é stato aggiunto – manca la data),………….)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
ARRAY OF RECALLS An array of 1 or more recalls, each one in the form of the entity described in TABLE 1 array (recalls)
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

updateActivities

Parameters Description Type Example
updateActivities Sends an array of activities to add, update or delete. returns: array(array(legacyid1, result1,msg1), array(legacyid2,result2,msg2), ……) array(array(ERUI2322,OK,A new activity has been added), array(HJK567,ERROR,activity hasn’t been added – duation is REQUIRED),………)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
REQUIRED ARRAY OF ACTIVITIES An array of 1 or more activities, each one in the form of the entity described in TABLE 1 array(activities)
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

updateMessages

Parameters Description Type Example
updateMessages Sends an array of messages to send or delete (if not already sent). returns: array(array(legacyid1,result1,msg1), array(legacyid2,result2,msg2),….) array(array(ERUI2322,OK,A new message has been sent), array(HJK567,ERROR,the message hasn’t been sent – the number is not in the right format), ….)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
REQUIRED ARRAY OF MESSAGES An array of 1 or more messages, each one in the form of the entity described in TABLE 1 array (messages)
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

getMessages

Parameters Description Type Example
getMessages Returns an array of messages whose status has been updated by some tuotempo process (eg: delivery status, answer by the receiver). returns: array(messages)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user admin username (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

searchMessages

Parameters Description Type Example
searchMessages returns tutte le informazioni relative al messaggio specificato da messageid Message array(to,userid,channel,subject,type,body,…)
REQUIRED database tuotempo account string tt_fabiobianchi
REQUIRED user username amministratore (email address) string f.bianchi@gmail.com
REQUIRED password admin password string fghj34gh
slave deprecated (leave empty) string
REQUIRED messageSearchObject same structure as the message object as specified in the TABLE 1. (when filled its parameters will work as a search criteria) string too long to show
find String to be searched in every message field string Hello
REQUIRED from number of the first wanted result string 0
REQUIRED count number of wanted results (0 means ALL) string 10
sessionid logged user sessionid returned by the login method (alternative to user & password) string 326378sd67236dsdsd
interface application type (sincro|web|desktop) string web

PHP example

< ? php require_once(‘nusoap/lib/nusoap.php’); $wsdlURL = “http://app.tuotempo.com/soap.php?wsdl”; $client=new nusoapclient($wsdlURL,true); // Check for an error $err = $client->getError();
if ($err) {
// Display the error
echo ‘< h2>Constructor error< /h2>< pre>’ . $err . ‘< /pre>’;
// At this point, you know the call that follows will fail
}
// Create the proxy
$proxy=$client->getProxy();

////////FIXTURES
$parameters['database'] = “tt_instance”;
$parameters['user'] = “admin@instance.com”;
$parameters['password'] = “1nst4nc3″;
$parameters['slave'] = null;
$parameters['sessionId'] = null;

$parameters['interface'] = ‘WEB’;
$parameters['schedule'] = array(action=>’update’,
scheduleid=>”,
scheduleTitle=>’Medico1′,
beginning=>’0′,
ending=>’0′,
daysofweek=>array(
0=>null,
1=>null,
2=>array(
array(startTime=>’10:00′,endTime=>’12:00′),
array(startTime=>’14:00′,endTime=>’16:00′)
),
3=>null,
4=>array(
array(startTime=>’9:00′,endTime=>’13:00′),
)
),
custom1=>”,
custom2=>”,
custom3=>”,
legacyid=>’Medico1′
);

$parameters['reservation'] = array(
action=>’update’,
‘resid’ => ”,
‘resourceids’=> array(‘Medico1′),
‘userids’ => array(‘lele’),
‘activityid’=> ‘Dermatologia’,
‘start_date’=> ’1262995200′,
‘end_date’ => ’1262995200′,
‘startTime’ => ’540′,
‘endTime’ => ’570′,
‘created’ => ’1262858392′,
‘parentid’ => null,
‘summary’ => ”,
‘notifications’ => 0,
‘recall’ => ’0′,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘lele’
);

$parameters['recall'] = array(
action=>’update’,
‘recid’ => ”,
‘resourceids’=> array(‘vostroid’),
‘userids’ => array(‘cacchio’),
‘activityid’=> ‘vostroid’,
‘start_date’=> ’1177552800′,
‘end_date’ => ’1177552800′,
‘startTime’ => 1005,
‘endTime’ => 1035,
‘created’ => ”,
‘parentid’ => null,
‘summary’ => ”,
‘notifications’ => 0,
‘recall’ => ’180′,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘vostroid’
);
$parameters['resource'] = array(
‘action’=>’update’,
‘resourceid’ => ”,
‘typologyids’ => array(‘Dermatologia’, ‘Neurologia’),
‘scheduleids’ => array(‘Medico1′),
‘areaids’ => array(‘Dermatologia’, ‘Neurologia’),
‘name’ => ‘Medico1′,
‘location’ => ”,
‘rphone’ => ”,
‘notes’ => ”,
‘status’ => ”,
‘minRes’ => 0,
‘maxRes’ => 0,
‘isHidden’ => 0,
‘email’ => ‘prueba@prueba.com’,
‘dayOffset’ => 0,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘Medico1′
);

$parameters['user'] = array(
array(
‘action’ => ‘update’,
‘userid’ => ”,
‘email’ => ”,
‘password’ => ‘fc6add639e80f76e047f642fe6952168′,
‘fname’ => ‘test’,
‘lname’ => ‘test’,
‘phone’ => ”,
‘institution’ => ”,
‘position’ => ”,
‘logon_name’ => ”,
‘communication’ => ‘all’,
‘privacy’ => ”,
‘address’ => ”,
‘cp’ => ”,
‘city’ => ”,
‘province’ => ”,
‘country’ => ”,
‘hometel’ => ’3408374210′,
‘worktel’ => ”,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘custom4′ => ”,
‘legacyid’ => ‘test’
)
);

$parameters['activities'] =
array( 0 => array(
‘action’ => ‘update’,
‘activityid’ => ”,
‘activityTitle’ => ‘Dermatologia’,
‘duration’ => 15,
‘price’ => 0,
‘comments’ => ‘test’,
‘typologyid’ => ‘Dermatologia’,
‘typologyTitle’ => ‘Dermatologia’,
‘recall’ => ”,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘Dermatologia’
),
1 => array(
‘action’ => ‘update’,
‘activityid’ => ”,
‘activityTitle’ => ‘Neurologia’,
‘duration’ => 15,
‘price’ => 0,
‘comments’ => ‘test’,
‘typologyid’ => ‘Neurologia’,
‘typologyTitle’ => ‘Neurologia’,
‘recall’ => ”,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘Neurologia’
),
2 => array(
‘action’ => ‘update’,
‘activityid’ => ”,
‘activityTitle’ => ‘Urologia’,
‘duration’ => 15,
‘price’ => 0,
‘comments’ => ‘test’,
‘typologyid’ => ‘Urologia’,
‘typologyTitle’ => ‘Urologia’,
‘recall’ => ”,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘Urologia’
)

);

$parameters['message'] = array(
‘action’ => ‘add’,
‘to’ => ‘+393408374210′,
‘userid’ => ”,
‘channel’ => ‘sms’,
‘subject’ => ”,
‘type’ => ”,
‘body’ => ‘ciao ciao’,
‘from’ => ‘lele’,
‘attachment_filename’ => ”,
‘attachment_content’ => ”,
‘sendingtime’ => ”,
‘sendingdate’ => ”,
‘received’ => ”,
‘status’ => ”,
‘answer’ => ”,
‘credits’ => ”,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ”
);

/* SEND DI UN ATTACHMENT*/
// apertura del file
/*
$filename = ‘Blue hills.jpg’;
$fp = @fopen( $filename, ‘rb’ );
$content = fread( $fp, filesize( $filename ) );
$content = base64_encode( $content );
fclose( $fp );
$filename = ‘./img/06042008938.jpg’;
$content = file_get_contents($filename);
$content = base64_encode( $content );
*/

$parameters['messageSearchObject'] = array(
‘action’ => ‘update’,
‘to’ => ”,
‘userid’ => ”,
‘channel’ => ”,
‘subject’ => ”,
‘type’ => ”,
‘body’ => ”,
‘from’ => ”,
‘attachment_filename’ => ”,
‘attachment_content’ => ”,
‘sendingtime’ => ”,
‘sendingdate’ => ”,
‘received’ => ”,
‘status’ => ”,
‘answer’ => ”,
‘credits’ => ”,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ”
);

$parameters['area'] = array(
‘action’ => ‘update’,
‘areaid’ => ”,
‘areaTitle’ => ‘test’,
‘isHidden’ => 0,
‘adminEmail’ => ”,
‘isDefault’ => 0,
‘created’ => time(),
‘modified’ => time(),
‘webTitle’ => ‘test’,
‘map_url’ => ‘test’,
‘webDescription’=> ‘test’,
‘custom1′ => ”,
‘custom2′ => ”,
‘custom3′ => ”,
‘legacyid’ => ‘test’
);

$parameters['availabilitiesSearchObject'] = array(
‘resourceName’ => ”,
‘resourceids’ => ”,
‘resource_legacyids’=> ”,
‘activityTitle’ => ”,
‘activityid’ => ‘ac4643449391a32′,
‘activity_legacyid’ => ”,
‘areaid’ => ”,
‘area_legacyid’ => ”,
‘duration’ => ”,
‘minTime’ => ”,
‘maxTime’ => ”,
‘start_date’ => ’10/11/2010′,
‘end_date’ => ”,
‘price’ => ”,
‘maxResults’ => 5,
‘minResultsPerResource’ => ”,
‘nextResults’ => ”
);
////////END FIXTURES

////////METHODS CALLS
//$result = $proxy->updateAreas($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'], array($parameters['area']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateUsers($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],array($parameters['user']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->getUsers($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'], $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateRecalls($parameters['database'],$parameters['user'],$parameters['password'],array($parameters['recall']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateActivities($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],$parameters['activities'], $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateSchedules($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],array($parameters['schedule']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateResources($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],array($parameters['resource']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateReservations($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],array($parameters['reservation']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->updateMessages($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],array($parameters['message']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->searchMessages($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],$parameters['messageSearchObject'],null,null,null, $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->autoUpdateSincro($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'],$parameters['version']) ;
//$result = $proxy->getReservations($parameters['database'],$parameters['user'],$parameters['password'],$parameters['slave'], $parameters['sessionId'], $parameters['interface']);
$result = $proxy->searchAvailabilities($parameters['database'],$parameters['username'],$parameters['password'],$parameters['slave'],array($parameters['availabilitiesSearchObject']), $parameters['sessionId'], $parameters['interface']);
//$result = $proxy->raiseGetEntity( $parameters['database'], $parameters['user'], $parameters['password'], $parameters['slave'], ‘Users’, $parameters['sessionId'], $parameters['interface']);
// Display the request and response
echo ‘Request’;
echo ‘< pre>’ . htmlspecialchars($proxy->request, ENT_QUOTES) . ‘< /pre>’;
echo ‘Response’;
echo ‘< pre>’ . htmlspecialchars($proxy->response, ENT_QUOTES) . ‘< /pre>’;
// Display the debug messages
//echo ‘Debug’;
//echo ‘< pre>’ . htmlspecialchars($proxy->debug_str, ENT_QUOTES) . ‘< /pre>’;
?>