2 Replies Latest reply: Jun 3, 2008 9:19 AM by jangdt RSS

    Keeping "CS Web Service session" alive while uploading big files.


      I have a problem when I'm uploading big files, which takes longer than the session timeout value, causing the upload to fail.

      As you all know uploading a file is a three step process:
      1). Create a new DocumentDefinition Item on the server as a placeholder.
      2). Open an HTTP connection to the created placeholder and transfer the data using the HTTPConnection.put() method.
      3). Create the final document using the FileManager by passing in the destination folder and the document definition.

      The problem is that step 2 take so long that the "CS Web Service Session" times out and thus step 3 can not be completed. The Developer guide gives a utility method for creating an HTTP connection for step 2 and it states the folllowing "..you must create a cookie for the given domain and path in order to keep the session alive while transferring data." But this only keeps the session of the HTTP Connection alive and not the "CS Web Service Session". As in my case step 2 completes succesfully and the moment I peform step 3 it throws an ORACLE.FDK.SessionError:ORACLE.FDK.SessionNotConnected exception.

      How does one keep the "CS Web Service Session" alive?

      Thanks in advance
        • 1. Re: Keeping "CS Web Service session" alive while uploading big files.
          Even tried oracle.ifs.fdk.SessionManger to wrap the upload in a session transaction and using the keepAlive method:

          - Create DocumentDefinition
          - Upload contents with HTTP Put
          - Create Final Document

          Still getting
          ORACLE.FDK.SessionError:ORACLE.FDK.SessionNotConnected exception the moment HTTP Put is done and step 3 (creating final Document) is performed.

          Please help: I'm looking for a easy/quick/simple way to keep the session alive, without writing thread code that sends dummy data through once in a while.

          Any help will be appreciated.
          Thanks a lot.
          • 2. Re: Keeping "CS Web Service session" alive while uploading big files.
            Okay, even a thread that pushes dummy stuff through once in a while doesn't help. I'm getting the following when the keep alive thread kicks in while uploading a big file.

            faultCode: {http://xml.apache.org/axis/}HTTP
            faultString: (409)Conflict
            {}:return code: 409
            <HTML><HEAD><TITLE>409 Conflict</TITLE></HEAD><BODY><H1>409 Conflict</H1>Concurrent Requests On The Same Session Not Supported</BODY></HTML>
                 at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:732)
                 at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
                 at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
                 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
                 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
                 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
                 at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
                 at org.apache.axis.client.Call.invoke(Call.java:2748)
                 at org.apache.axis.client.Call.invoke(Call.java:2424)
                 at org.apache.axis.client.Call.invoke(Call.java:2347)
                 at org.apache.axis.client.Call.invoke(Call.java:1804)
                 at oracle.ifs.fdk.FileManagerSoapBindingStub.existsRelative(FileManagerSoapBindingStub.java:1138)

            I don't understand this, as the exception talks about "Concurrent Requests On The Same Session", but if their is already a request going on why is the session timing out in the first place?!

            I must be doing something really stupid somewhere. Aia ajay jay what a unproductive day...

            Any help? It will be greatly appreciated...