You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openmeetings.apache.org by Jacob Gaiski <jg...@emich.edu> on 2012/08/17 18:19:58 UTC

Help with SOAP API getInvitationHash

Hello,

I’ve got a few questions in regards to the getInvitationHash SOAP API call.
Specifically, when using the SOAP call getInvitationHash, when a user is in
the room and clicks their Profile, they immediately get logged out “twice”
of the room, and then get redirected to OpenMeetings  landing page
post-login.

Here is the soap code that I’m using:


**CODE BEGIN**
public string PermitEmail(string email, string fname, string lname, long 
roomid)
   {
       System.ServiceModel.EndpointAddress address = new 
System.ServiceModel.EndpointAddress("http://www.***.com/convene/");

       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, "GuestAccount", 
"GuestAccount");


       // uid = apibot, pw = *******************************

       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 userobjectset = client.setUserObject(session.session_id, 
"GuestAccount", "bob saget", "bob saget", 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", email);

       // long a = client.setUserObjectWithExternalUser(session.session_id, 
"GuestLogin", name, "", 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", "", 925, 
"guest_user");
       // session = client.getSession();
       //client.setUserObject(session.session_id, "GuestLogin" + 
session.session_id, name, "", 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", "GuestLogin" 
+ session.session_id);
       long testt = 0;
       long testt2 = 0;
      testt =  client.setUserObject(session.session_id, "apibot", name, 
"blah", "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", 
"GuestLogin" + session.session_id);
      //client.setUserAndNickName
      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);
       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", 
"guest@guest.com", 923, "guest_user");

       //client.setUserObject(
       retz = room_client.getInvitationHash(session.session_id, email, 
room_id, false, "", 3, "", "", "", "");
       testt2 = client.setUserObjectWithExternalUser(session.session_id, 
"GuestAccount", "Guest", "Test", 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", 
"guest@guest.com", 923, "guest_user");
       //client.
       testt = client.setUserObject(session.session_id, "apibot", name, 
"blah", "http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", 
"GuestLogin" + session.session_id);
       //client.setUserObjectAndGenerateRoomHashByURL(
       // retz = client.setuser
       //ret = client.loginUser(session.session_id, "GuestAccount", 
"guestaccount");

       bool blah;
       if(testt > 0)
           blah = false;
       room_client.Close();
       //retz = client.setUserObjectAndGenerateRoomHash(session.session_id, 
"guest", fname, lname, 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", email, 922, 
"guest_user", room_id, 1, 1);
       // retz = client.setUserObjectWithExternalUser(session.session_id, 
"GuestAccount", name, "", 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", email, 923, 
"guest_user");

       // retz = client.setUserObjectAndGenerateRoomHash(session.session_id, 
"Guest", fname, lname, 
"http://citizenmed.files.wordpress.com/2011/08/user-icon1.jpg", email, 0, 
"User", room_id, 0, 1);
       //retz = 
client.setUserObjectAndGenerateRecordingHashByURL(session.session_id, 
"Guest", fname, lname, 0, "", 162);
       //retz = client.has
       //retz = client.setUserObjectMainLandingZone
       client.Close();
       return retz;
   }
**CODE END**


Code is a bit messy, since it’s still being tested.


Thank you.

Jacob C. Gaiski
734-660-8715
Software Developer
Creative System Dynamics
W. 9 Mile, Southfield, MI
http://www.csdengine.com/
http://www.netcsd.com/
http://www.mtgengine.com/
This communication is for the exclusive use of the addressee and may contain 
proprietary, confidential or privileged information. If you are not the 
intended recipient any use, copying, disclosure, dissemination or 
distribution is strictly prohibited.