Hi Jake,

why do you call setUserAndNickName AND setUserObject ?
Both return a single hash.
There is no need to call two functions, the API methods to
"setUserObjectXYZ" are not adding more information depending on how
many you call of them.
Each Hash returned by the functions is unique. It will not add "more
information" when you call another time with the same sessionId
another API call.

The most advanced method is to use that one:
http://incubator.apache.org/openmeetings/UserService.html#setUserObjectAndGenerateRoomHashByURL

Sets the SessionObject for a certain SID, after setting this
Session-Object you can use the SID + a RoomId to enter any Room. ++
the user can press f5 to reload the page / use the link several times,
the SOAP Gateway does remember the IP of the user and the will only
the first user that enters the room allow to re-enter. ...
Session-Hashs are deleted 15 minutes after the creation if not used.

externalUserId and externalUserType are random numbers from your system.
The only trick about it is that you should use the same
externalUserId+externalUserType combination whenever the same user
from your system is entering the conference room via SOAP/REST.
OpenMeetings internally will automatically create (and update) a user
profile with the externalUserId+externalUserType.
Everytime the user access the room with the same
externalUserId+externalUserType OpenMeetings will map a user profile
to it, so that the user has the same files in his private drive in the
File-Eplorer available. In the future there might be more user
specific settings that are bound the user.

The param "username" is also just a random string. OpenMeetings will
automatically update /sync the user profile based on the
externalUserId+externalUserType.

THe user profiles that OpenMeetings will generate automatically for
the externalUserId+externalUserType are not intend to be able to login
via the usual login shield. You will find them in the user
administration of OpenMeetings but you cannot login with those users
as they have no password set (and also because there could be
potentially duplicates in the username).

Sebastian

2012/8/23 Jacob Gaiski <[email protected]>:
> Hey Sebastion,
>
> After scanning through the error log, I was not able to find any errors.
> However, it appears that whenever I 'setUserObject'(rather that be
> setUserAndNickname,or setUserObjectandGenerateRoomHash') the guest takes on
> the identity of the system administrator. I've simplified my code into this
> function call:
>
>
> *CODE START*
> public string AcceptGuest(string email, string fname, string lname, long
> roomid)
>      {
>          string hash = "";
>          long loginStatus = -1;
>          UserService.UserServicePortTypeClient client = new
> UserServicePortTypeClient("UserServiceHttpSoap12Endpoint");
>          RoomService.RoomServicePortTypeClient room_client = new
> RoomServicePortTypeClient("RoomServiceHttpSoap12Endpoint");
>          client.Open();
>          room_client.Open();
>          UserService.Sessiondata session = client.getSession();
>
>          loginStatus = client.loginUser(session.session_id, "apiguest",
> "*");
>          client.setUserObject(session.session_id, "guestuser", "test",
> "test", "test", "[email protected]");
>          //hash =
> client.setUserObjectAndGenerateRoomHashByURL(session.session_id,
> "guestuser", fname, lname,
> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";,
> "[email protected]", -1, "guest_user_anonymous_guest", roomid, 1, 1);
>          //hash= client.setUserObjectAndGenerateRoomHash(session.session_id,
> "guestuser", "bd", "dfgdf",
> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";,
> "[email protected]", 99290, "user", roomid, 0, 1);
>          hash = client.setUserAndNickName(session.session_id, "guestuser",
> fname, lname, "", email, 999999999999, "jake_dev_pc", roomid, 1, 0, 0);
>          client.setUserObject(session.session_id, "UserTest1234567", "test",
> "test", "", "[email protected]");
>          room_client.Close();
>          client.Close();
>          return hash;
>      }
> *CODE END*
>
>
> Does the username information need to be valid to a user account? I'm
> assuming that externaluserID, externaluserType, and username all MUST match
> a valid user in the database?
>
>
> -Jake
>
> -----Original Message----- From: [email protected]
> Sent: Thursday, August 23, 2012 10:53 AM
>
> To: [email protected]
> Subject: Re: getInvitationHash method
>
> Hi Jake,
>
> please have a look at the openmeetings.log. It does contain the error
> message what went wrong.
>
> "I'm also not getting the exit button. I noticed this when I navigated
> to the landing page and started a room from within the system. I'm
> also using SOAP."
> => There is no exit button if you access the room via SOAP. What
> should happen if you press "Exit"? Browser close?
>
> Sebastian
>
> 2012/8/23 Jacob Gaiski <[email protected]>:
>>
>> Hello Sebastion,
>>
>>
>> Thank you very much for taking the time to help. I greatly appreciate it.
>>
>>
>> As for the user accounts that I associate them too, I'm putting in all of
>> their information; externaluserid, externalusertype, username, etc. The
>> only
>> thing not matching is the first and last name.
>>
>> I'm also not getting the exit button. I noticed this when I navigated to
>> the
>> landing page and started a room from within the system. I'm also using
>> SOAP.
>>
>>
>> So, just to run through the process I'm using. Actually, I'll just slab my
>> code in:
>>
>>
>> *CODE START*
>> public string PermitEmail(string email, string fname, string lname, long
>> roomid)
>>        {
>>
>>            UserService.UserServicePortTypeClient client = new
>> UserServicePortTypeClient("UserServiceHttpSoap11Endpoint");
>>            RoomService.RoomServicePortTypeClient room_client = new
>> RoomServicePortTypeClient("RoomServiceHttpSoap11Endpoint");
>>            RoomService.SearchResult results;
>>            RoomService.Rooms[] room_result;
>>            //client.Endpoint.Address = address;
>>            client.Open();
>>            UserService.Sessiondata session = client.getSession();
>>            long ret = 0;
>>            long room_id = 0;
>>            room_id = roomid;
>>           // ret = client.loginUser(session.session_id, "apibot", "*");
>>            ret = client.loginUser(session.session_id, "apiguest", "*");
>>
>>            // uid = apibot, pw = botapi001
>>
>>            room_client.Open();
>>            Rooms single_room =
>> room_client.getRoomWithCurrentUsersById(session.session_id, room_id);
>>            string retz = "";
>>
>>            //single_room.currentusers;
>>            // long id = single_room.ownerId.Value;
>>            //string retz = "";
>>            string first_name;
>>            char[] first_name_char;
>>            string last_name;
>>            char[] last_name_char;
>>            if (fname.Length > 0)
>>            {
>>                first_name = fname.ToLower();
>>                first_name_char = fname.ToCharArray();
>>
>>                first_name_char[0] = char.ToUpper(first_name_char[0]);
>>                fname = "";
>>                for (int _i = 0; _i < first_name_char.Length; _i++)
>>                    fname += first_name_char[_i];
>>            }
>>
>>            if (lname.Length > 0)
>>            {
>>                last_name = lname.ToLower();
>>                last_name_char = lname.ToCharArray();
>>
>>                last_name_char[0] = char.ToUpper(last_name_char[0]);
>>                lname = "";
>>                for (int _i = 0; _i < last_name_char.Length; _i++)
>>                    lname += last_name_char[_i];
>>            }
>>            string name = fname + " " + lname;
>>            email = email.ToLower();
>>            long setUserObject = 0;
>>           // setUserObject = client.setUserObject(session.session_id,
>> "guestuser", name, "",
>> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";, email);
>>            // long userobjectset =
>> client.setUserObject(session.session_id,
>> "GuestAccount", "bob saget", "bob saget",
>> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";, email);
>>
>>            long testt = 0;
>>            long testt2 = 0;
>>
>>            SQLClient MySqlClient = new
>> SQLClient(settings.ApplicationName);
>>          //  while(MySqlClient.IsRoomJoinHashValid(retz) == false)
>>             //   retz = client.setUserAndNickName(session.session_id,
>> "GuestLogin" + session.session_id, name, "",
>> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";,
>> "GuestLogin"
>> + session.session_id, 926, "guest_loginn" + session.session_id, room_id,
>> 0,
>> 1, 0);
>>           // testt2 =
>> client.setUserObjectWithExternalUser(session.session_id, "GuestAccount",
>> "Guest", "Test",
>> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";,
>> "[email protected]", 923, "guest_user");
>>            retz = client.setUserAndNickName(session.session_id,
>> "guestuser",
>> name, "", "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";,
>> email, 99290, "guest_user_anonymous_guest", room_id, 0, 1, 1);
>>
>>
>>            bool blah;
>>            if(testt > 0)
>>                blah = false;
>>            room_client.Close();
>>
>>            //retz = client.setUserObjectMainLandingZone
>>            this.session_id = session.session_id;
>>            client.Close();
>>            return retz;
>>        }
>> *CODE END*
>>
>>
>> apiguest, is a user of type Webservice SOAP admin.
>> apibot is a usertype of Administrator.
>>
>>
>> Am I associating in the wrong order? Or simply using a mismatch of login
>> permissions?
>>
>>
>> The information in the setUserObject calls are correct to the account that
>> the username paremeter represents.
>>
>>
>> -Jake
>>
>> -----Original Message----- From: [email protected]
>> Sent: Thursday, August 23, 2012 10:08 AM
>>
>> To: [email protected]
>> Subject: Re: getInvitationHash method
>>
>> Hi Jacob,
>>
>> from your code snippet I hardly can say if the params are complete or not.
>> You should really make sure that you meet all params in its name and
>> in its type.
>> There are no optional parameters, every param needs to be specified in
>> the REST call.
>> It is also not allowed to specify an empty string if the actual param
>> is an int,long or any other type of number or boolean.
>>
>> And after that you add the param to the URL.
>> You should have a look at the openmeetings.log to see the trace,
>> system error actual means there was an exception. In most of the cases
>> the exception happens because some params in the REST call have been
>> wrong.
>>
>> Sebastian
>>
>> 2012/8/23 Jacob Gaiski <[email protected]>:
>>>
>>>
>>> Whoops, sorry.
>>>
>>>
>>> I'm setting the userobject already with that API call. however they
>>> appear
>>> to be drawing the administrator profile instead of the guest profile that
>>> the account is associated with.
>>>
>>>
>>> Here's the call:
>>>
>>>            ret =
>>> client.setUserObjectAndGenerateRoomHash(session.session_id,
>>> "guestuser", fname, lname,
>>> "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg";, email,
>>> 99290, "guest_user_anonymous_guest", room_id, 0, 1);
>>>
>>> -----Original Message----- From: Jacob Gaiski
>>> Sent: Thursday, August 23, 2012 9:46 AM
>>>
>>> To: [email protected]
>>> Subject: Re: getInvitationHash method
>>>
>>> Ok, so I went back and tried with setUserObjectandGenerateRoomHash.
>>>
>>>
>>> Do you need to use any setUserObject properties with this?
>>>
>>>
>>> Looks like I'm starting to see the desired effect.
>>>
>>> -----Original Message----- From: [email protected]
>>> Sent: Thursday, August 23, 2012 9:34 AM
>>> To: [email protected]
>>> Subject: Re: getInvitationHash method
>>>
>>> Why generating invitation Hash and not usual room hashs?
>>> Invitation hashs are append to the URL with
>>> ?invitationHash=$HASH
>>> normal hashs are append with
>>> ?secureHash=$HASH
>>>
>>> maybe you simple using the wrong url parameter?
>>>
>>> Sebastian
>>>
>>> 2012/8/23 Jacob Gaiski <[email protected]>:
>>>>
>>>>
>>>>
>>>> Hello,
>>>>
>>>> Could someone please help me with the soap API call ‘getInvitationHash’?
>>>>
>>>>
>>>> I’m assuming you have to specifically call this method when logged in as
>>>> SOAP permissions however I’m getting a generic error that reads “Sys –
>>>> Error”.
>>>>
>>>>
>>>>
>>>> Without posting code, does anybody by any chance know what Sys – Error
>>>> correlates too?
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> -Jake
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sebastian Wagner
>>> https://twitter.com/#!/dead_lock
>>> http://www.webbase-design.de
>>> http://www.wagner-sebastian.com
>>> [email protected]
>>>
>>
>>
>>
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> [email protected]
>
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> [email protected]



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
[email protected]

Reply via email to