First; this question is similar to another but still unresolved question: the call to magento soap api expires immediately
I am working on a client-server module based on XMLRPC. The Magento server has several API methods that work with the Java client. I am using standard Java XMLRPC Jars in my client.
I have a "login" call that retrieves a session. Then I pass this on to make different calls. I checked that this returns (something similar) a valid session.
Object result1 = client.execute("login", ob1); session = (String) result1;
The following call that I make using this session fails:
org.apache.xmlrpc.XmlRpcException: Session expired. Try to relogin.
What I checked:
- Set Magento Session Timeout to High
- Check server time setting
- Active Validation API User in Magento
- Check
api_session table for hash session
api_session table
- I do not have a current session hash.
- It also has only 11 entries; I registered about 50 times.
- Session time differs significantly from
select CURRENT_TIME- Update: it doesn't matter (MySQL is written in GMT)
Here is what I see:
mysql> select * from api_session limit 50; +---------+---------------------+----------------------------------+ | user_id | logdate | sessid | +---------+---------------------+----------------------------------+ | 5 | 2013-02-01 16:01:49 | 9099b50 | 5 | 2013-02-01 16:02:10 | 7312c1a | 5 | 2013-02-01 16:05:43 | a6ce30c +---------+---------------------+----------------------------------+ 11 rows in set (0.00 sec) mysql> select CURRENT_TIME; +--------------+ | CURRENT_TIME | +--------------+ | 14:58:03 | +--------------+
source share