That exactly what I'm doing, and yes, I'm getting a SoapException.I wish it would just reply with an error in the response as opposed to throwing a soap exception, but oh well.
I think you're idea will work. I was hoping for a solution without a workaround, but that will have to do. For now, I'm just telling the user to go logout themselves. I have more issues with reddot to figure out now. New post coming soon! On Jan 5, 3:52 pm, bushland25 <[email protected]> wrote: > Are you using a .NET application to call the webservice? I think that > you are considering that you get a SoapException. > > Anyway, why don't you have an ASP file on the server that simply > returns the session login. Since the ASP script doesn't crash if the > user is already logged in, it will always work. You can then have your > webservice first call the ASP file, get the session guid, and then > continue with your operations. I know it sounds like more than what's > needed, but I think it will work more effectively than anything else. > > On Jan 5, 12:42 pm, bushland25 <[email protected]> wrote: > > > Yes, I shall :). Let me know if you come up with a solution. > > > On Jan 5, 12:01 pm, Kareem <[email protected]> wrote: > > > > So maybe you can bash your head against your desk too. :) > > > > On Jan 5, 2:59 pm, bushland25 <[email protected]> wrote: > > > > > Oh wonderful... I didn't even see that. Hmm... > > > > > On Jan 5, 11:51 am, Kareem <[email protected]> wrote: > > > > > > You mean this notation as a placeholder for me to put the value in > > > > > right? [!guid_login!] > > > > > I'll have nothing to fill it with. I don't know the login guid. > > > > > > I'm starting to think this isn't possible. Surprising something so > > > > > basic isn't possible. > > > > > > On Jan 5, 2:06 pm, bushland25 <[email protected]> wrote: > > > > > > > How about this... You can check with RQL if a user is logged in > > > > > > using > > > > > > the following: > > > > > > > <IODATA loginguid="[!guid_login!]"> > > > > > > <ADMINISTRATION> > > > > > > <USERS userguid="[!guid_user!]" action="connectlist"/> > > > > > > </ADMINISTRATION> > > > > > > </IODATA> > > > > > > > You can get the user guid from the database as I mentioned in my > > > > > > prior > > > > > > post. In your response XML, you will find the login guid if the user > > > > > > is logged in. You can then retrieve the session variable or log the > > > > > > user out before logging in. > > > > > > > On Jan 5, 5:51 am, Kareem <[email protected]> wrote: > > > > > > > > hmm. The issue is using the login rql statement causes the > > > > > > > webservice > > > > > > > to throw an exception, so I get zero information back on the > > > > > > > logged > > > > > > > in user. > > > > > > > I'm only left with the username and password entered. > > > > > > > I'm running this from outside of reddot, so I don't have access > > > > > > > to its > > > > > > > session variables. > > > > > > > > Here's a thought. Is there some super user than can query all > > > > > > > logged > > > > > > > in users and retrieve their session keys? Or perhaps I can make a > > > > > > > user > > > > > > > just for this application. > > > > > > > > Is there a query for a user by name to retrieve their current > > > > > > > login > > > > > > > guid? I could then use that to log them out. > > > > > > > > On Jan 4, 3:50 am, akor <[email protected]> wrote: > > > > > > > > > Ah sorry, one thing more, you can get the session key then by > > > > > > > > this: > > > > > > > > sRQLRequest = "<IODATA loginguid='" & strLoginGUID & > > > > > > > > "'><ADMINISTRATION action='validate' guid='" & strLoginGUID & > > > > > > > > "'><PROJECT guid='" & strProjectGUID & "' /></ADMINISTRATION></ > > > > > > > > IODATA>" > > > > > > > > > -alex > > > > > > > > > On Jan 3, 11:31 am, akor <[email protected]> wrote: > > > > > > > > > > Hi Kareem, > > > > > > > > > > Try this: > > > > > > > > > > Public Function GetLoginGuid(strLoginUser,strLoginPass) > > > > > > > > > sRQLRequest = "<IODATA><ADMINISTRATION action='login' > > > > > > > > > name='" & > > > > > > > > > strLoginUser & "' password='" & strLoginPass & "'/></IODATA>" > > > > > > > > > Set oRQLResponse = SendRQLRequest(sRQLRequest) > > > > > > > > > Set oNode = oRQLResponse.selectSingleNode("//LOGIN") > > > > > > > > > If oNode Is Nothing Then > > > > > > > > > Response.Write "ERROR: No LoginGUID found..." > > > > > > > > > Exit Function > > > > > > > > > End If > > > > > > > > > strLoginGUID = oNode.GetAttribute("guid") > > > > > > > > > If (sError="#RDError101") Then > > > > > > > > > Call LogOut(strLoginGUID) > > > > > > > > > Call GetLoginGuid(strLoginUser,strLoginPass) > > > > > > > > > End If > > > > > > > > > GetLoginGuid = strLoginGUID > > > > > > > > > Set oRQLResponse = Nothing > > > > > > > > > Set oNode = Nothing > > > > > > > > > End Function > > > > > > > > > > I wrote this function for SOAP & WSDL. It logins you with the > > > > > > > > > provided > > > > > > > > > credentials and grabs the Login GUID. If the User is already > > > > > > > > > logged > > > > > > > > > in, it calls a LogOut function and the Login Function again. > > > > > > > > > > Best, > > > > > > > > > -alex > > > > > > > > > > On Jan 3, 2:56 am, Kareem <[email protected]> wrote: > > > > > > > > > > > That's the problem. I have nothing more than a username and > > > > > > > > > > password > > > > > > > > > > typed in by the user. I have no login guid, no user guid, > > > > > > > > > > and no > > > > > > > > > > session key. > > > > > > > > > > I can't do anything without a login guid, so I'm stuck. > > > > > > > > > > > On Jan 2, 7:39 pm, bushland25 <[email protected]> wrote: > > > > > > > > > > > > Hmmm... Never worked with the webservice, and so I'd be a > > > > > > > > > > > little lost > > > > > > > > > > > there... However, why don't you just ignore the error and > > > > > > > > > > > then request > > > > > > > > > > > the session key? That is what I do in some of my other > > > > > > > > > > > scripts... > > > > > > > > > > > Basically, I send the user guid and receive the 101 error > > > > > > > > > > > because I am > > > > > > > > > > > currently logged in. I ignore the error and then send the > > > > > > > > > > > same login > > > > > > > > > > > guid to get the session key and it works. Have you tried > > > > > > > > > > > that? I then > > > > > > > > > > > use the user guid and the session key for all my other > > > > > > > > > > > queries. > > > > > > > > > > > > On Jan 2, 1:01 pm, Kareem <[email protected]> wrote: > > > > > > > > > > > > > I will be integrating something else into RedDot, so > > > > > > > > > > > > that session > > > > > > > > > > > > information is good know. Thanks! > > > > > > > > > > > > > What I'm working on now though is an external tool, so > > > > > > > > > > > > I have to > > > > > > > > > > > > retrieve all the information from the webservice. > > > > > > > > > > > > > How do you retrieve the session key when you don't have > > > > > > > > > > > > the login > > > > > > > > > > > > guid? Its required in the IODATA element. > > > > > > > > > > > > I'm also trying to retrieve the list of project for the > > > > > > > > > > > > user, which > > > > > > > > > > > > needs the user guid. All that information is in the > > > > > > > > > > > > response for the > > > > > > > > > > > > login action which is failing because the user is > > > > > > > > > > > > already logged in. > > > > > > > > > > > > > On Jan 2, 2:08 pm, bushland25 <[email protected]> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > If you are launching the script from a RedDot page > > > > > > > > > > > > > that you are > > > > > > > > > > > > > currently logged into, all the login information is > > > > > > > > > > > > > stored inside ASP > > > > > > > > > > > > > session variables. So, you can basically just read > > > > > > > > > > > > > those session > > > > > > > > > > > > > variables to get the current login information. For > > > > > > > > > > > > > example: > > > > > > > > > > > > > > Dim sLogin > > > > > > > > > > > > > Dim sSession > > > > > > > > > > > > > > sLogin = Session("LoginGuid") > > > > > > > > > > > > > sSession = Session("SessionKey") > > > > > > > > > > > > > > That works well for me and I don't have to deal with > > > > > > > > > > > > > figuring out > > > > > > > > > > > > > whether or not a user is already logged in when > > > > > > > > > > > > > running the RQL. > > > > > > > > > > > > > > For the scripts that I did need the login for, I just > > > > > > > > > > > > > ignored the > > > > > > > > > > > > > error I received that said the user was logged in > > > > > > > > > > > > > already. I could > > > > > > > > > > > > > then retrieve the session key and continue. > > > > > > > > > > > > > > On Jan 2, 5:29 am, Kareem <[email protected]> > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > I'm using the RQL webservice to login and query > > > > > > > > > > > > > > RedDot. The problem I > > > > > > > > > > > > > > have is when a user attempts to login but already > > > > > > > > > > > > > > have a session in > > > > > > > > > > > > > > RD. > > > > > > > > > > > > > > I get an RDError101. I would like to present the > > > > > > > > > > > > > > user with an option > > > > > > > > > > > > > > to logout the other session and login anyways. > > > > > > > > > > > > > > > Its mentioned here that the existing login guid is > > > > > > > > > > > > > > retrievable, but I > > > > > > > > > > > > > > can't figure out > > > > > > > > > > > > > > how.http://groups.google.com/group/RedDot-CMS-Users/msg/4fb33dca64453ad1 > > > > > > > > > > > > > > > The RDError101 is thrown in a SoapException. I > > > > > > > > > > > > > > don't actually get an > > > > > > > > > > > > > > xml response from the webserver. > > > > > > > > > > > > > > > Does anyone know how to retrieve the existing login > > > > > > > > > > > > > > guid in this > > > > > > > > > > > > > > scenario?- Hide quoted text - > > > > > > > > > > > > > - Show quoted text -- Hide quoted text - > > > > > > > > - Show quoted text -- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/RedDot-CMS-Users?hl=en -~----------~----~----~----~------~----~------~--~---
