Welcome Guest, Not a member yet? Register   Sign In
XML-RPC = Multiple Sessions?
#1

[eluser]Exxon[/eluser]
Every time I connect to my XML-RPC Server. Code Igniter creates a new session. Is there a way to have only one session per client connected? (Will be mostly Java clients).

I have read about how you can pass just pass a encrypted string with the username+password+ time stamp but it just feels if it could waste a lot of resources authenticating on every request.

So is there a way to keep one session or will I just have to pass the session id and authorization details every time?

Thanks in advance
#2

[eluser]Colin Williams[/eluser]
In this case it is a client issue, not a server issue. Sessions are a feature of the client. Your Java clients would need to work with cookies in order to maintain sessions.
#3

[eluser]Exxon[/eluser]
Ok read about it a bit too. So is their a XML-RPC library, that you might know of, that supports cookies?

And Thanks for the reply
#4

[eluser]Colin Williams[/eluser]
Okay. Again. It is the client needing to support cookies! CodeIgniter already does it fine. Peruse your XML-RPC controller via a web browser and your sessions will work just fine because the browser (the client) supports cookies.
#5

[eluser]Exxon[/eluser]
Sorry let me rephrase do you know of a JAVA XML-RPC library that would support cookies I am using apache's library but code igniter gives me a session each time. If someone can just point me into the right direction thanks.

Misunderstanding ...
#6

[eluser]Colin Williams[/eluser]
Aha.. Well, in that case, sorry for grillin' ya.
#7

[eluser]alboyd[/eluser]
Sorry for bringing up an old thread but I have a similar question...

I'm writing a XML RPC client in PHP which is talking to a XML RPC Server in my CodeIgniter site. I must restrict clients from doing certain things if they have done it already within the last 24 hours. This works fine with sessions on my site by itself but when the RPC client accesses the site a new session is created each time...

I have read this thread and I get that it needs to be handled on the client side but I can't think of a reliable way to do so without using a database which is just not possible for my needs. Cookies... can be deleted or not supported.. Sessions will expire when they close the browser window....

The only thing I can think is to track IP address of the client in a database on my site and manage it that way..

Any thoughts? Anyone know a way to formulate the xmlrpcmsg so that my server knows it's the same client and maintains a session for this? Anyone got any ideas? THANKS!
#8

[eluser]Colin Williams[/eluser]
Let me pick this apart

[blockquote]I’m writing a XML RPC client[/blockquote]

Keep in mind, YOU are writing the client, so the only features it has are those you provide

[blockquote]when the RPC client accesses the site a new session is created each time…[/blockquote]

Understand that CodeIgniter is creating the session* because it sees the absence of a session ID in the cookie. You probably aren't even sending cookies to the server.

* This means, CodeIgniter is storing the session data in its database, or trying to save them as cookies (i.e. in the response header) but if you're client does nothing with the cookies...

[blockquote]I can’t think of a reliable way to do so without using a database[/blockquote]

You MUST use some sort of persistent storage method. If not a database like MySQL or Postgres, etc, then XML or delimited ASCII files.

[blockquote]Cookies… can be deleted or not supported.. Sessions will expire when they close the browser window….[/blockquote]

How is this relevant. You're talking about "the browser window" but what does that have to do with your client, which is not a browser (I don't assume).

[blockquote]Anyone know a way to formulate the xmlrpcmsg so that my server knows it’s the same client and maintains a session for this?[/blockquote]

That's what request headers are for. Read http://doc.sumy.ua/OreillyCD/web/webnut/ch12_02.htm




Theme © iAndrew 2016 - Forum software by © MyBB