AnsweredAssumed Answered

Web service session timeout

Question asked by sylvain78 on Sep 1, 2007
Latest reply on Dec 3, 2010 by cristian
I had problem with my web service session timing out so I started to do a little bit of testing.

I realized that the web service session times out with the web-client session.
Let's say I set the session-timeout to 2 minutes in the web.xml, my web service session only lasts for 2 minutes.

I thought the web service ticket did not expire by default (ticketsExpire is set to false in authentication-service-context.xml)

I used the following code for testing and the get(Predicate) only executes twice before I get the WSSecurityEngine: Callback supplied no password … error:


AuthenticationUtils.startSession(USERNAME, PASSWORD);
System.out.println("Session started.");
       
    try
    {       
        for (int i = 0; i < 5; i++)
       {
            Reference reference = new Reference(STORE, null, xpath);
            Predicate predicate = new Predicate(
                new Reference[] {reference}, STORE, null);
            Node[] nodes =
                WebServiceFactory.getRepositoryService().get(predicate);
            Thread.sleep(1 * 60000);
       }
    }
    finally
    {
        // End the session
        AuthenticationUtils.endSession();
        System.out.println("Session ended.");
    }
}

Someone knows what is going on?

Thanks!

Outcomes