Re: SOAP/REST API issues - Openmeetings 1.9.1 [Update Correct images Links]

Showing 1-1 of 1 messages
Re: SOAP/REST API issues - Openmeetings 1.9.1 [Update Correct images Links] Sebastian Wagner 1/5/12 1:49 PM

Could you please use the new mailing list at Apache?

Am 05.01.2012 22:39 schrieb "andre bolinhas" <andre.b...@gmail.com>:

Hi  Sebastian,

I Have the following issues when I try add a room trought SOAP/REST API.

The room is successfully created, the appointment is successfully added in calendar  and the invitation is sent, but I have this issues:

1º In invitations email sent to external users i get a Error formatSubjec and Error formatMessage in body

2º The name and description of appointment are wrong:


3º The attendess added to my room/appointment is only the external user of my addMeetingMemberRemindToRoom fucntion, should not automatically add me (user that create the room and appointment) as owner/moderator?



This is my code: 
<?php
require_once('lib/nusoap.php');

$client_userService = new nusoap_client("http://hostname:5080/openmeetings/services/UserService?wsdl", "wsdl");
 //$client_userService->setUseCurl(true);
$err = $client_userService->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
echo '<h2>Debug</h2><pre>' . 
htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
exit();
}
$resultSesssion = $client_userService->call('getSession');
if ($client_userService->fault)
{
echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; 
print_r($result); 
echo '</pre>';
else
{
$err = $client_userService->getError();
if ($err) {
echo '<h2>Error2</h2><pre>' . $err . '</pre>';
else
{
//echo '<h2>Result</h2><pre>'; 
print_r($result); 
echo '</pre>';
$client_userService->session_id = $resultSesssion["return"]["session_id"];
echo '<h2>Result</h2><pre>'; 
print_r($resultSesssion); 
echo '</pre>';
$params = array(
'SID' => $client_userService->session_id,
'username' => 'user',
'userpass' => 'pass'
);
//$params = array();
$autologin = $client_userService->call('loginUser',$params);
echo '<h2>Params</h2><pre>'; 
print_r($autologin); 
echo '</pre>';
if ($client_userService->fault) 
{
echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; 
print_r($autologin); 
echo '</pre>';
else
{
$err = $client_userService->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
else 
{
echo '<h2>result</h2><pre>'; 
print_r($autologin); 
echo '</pre>';
}
}
}
}
$client_roomService = new nusoap_client("http://hostname:5080/openmeetings/services/RoomService?wsdl", true);
$err = $client_roomService->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
exit();
}  
$params = array(
'SID' => $client_userService->session_id,
'name' => 'test',
'roomtypes_id' => 1,
'comment' => 'Test SOAP',
'numberOfPartizipants' => 50,
'ispublic' => true,
'appointment' => true,
'isDemoRoom' => false,
'demoTime' => '',
'isModeratedRoom' => true,
'externalRoomType' => '',
'validFromDate' => '05-01-2012',
'validFromTime' => '16:00',
'validToDate' => '05-01-2012',
'validToTime' => '17:00',
'isPasswordProtected' => false,
'password' => '',
'reminderTypeId' => 2,
'redirectURL' => ''
);
$addroom = $client_roomService->call('addRoomWithModerationAndExternalTypeAndStartEnd',$params);
if ($client_roomService->fault) {
echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; print_r($addroom); echo '</pre>';
} else {
$err = $client_roomService->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($addroom["return"]); echo '</pre>';
//return $addroom["return"];

}
}   
$params = array (
'SID' => $client_userService->session_id,
'room_id' => $addroom["return"],
'firstname' => 'Andre',
'lastname' => 'Pedro',
'email' => 'andre[at]mail.com',
'language_id' => 1
);
$sent_invite = $client_roomService->call('addMeetingMemberRemindToRoom',$params);
if ($client_roomService->fault) {
echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; print_r($sent_invite); echo '</pre>';
} else {
$err = $client_roomService->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($sent_invite["return"]); echo '</pre>';
//return $addroom["return"];

}
}  

?>