Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/SOAP/Server Applications    [ Add a report in this area ]  
Report #:  12979   Status: Open
DSML SOAP Session Support in TSOAPDatamodule
Project:  Delphi Build #:  9.0.1935.22056
Version:    9.0 Submitted By:   Atle Smelvaer
Report Type:  New Feature Request Date Reported:  5/21/2005 9:05:56 AM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   249063
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
4.00 out of 5
Total Votes: None
Description
When using TSOAPDatamodule, any component inside is recreated every time a single little request is done. This makes TSOAPDatamodule useless for other than small demos.

Creating a standard SOAP interface with calls where you return the data property of clientdataset's will work mutch better, and you avoid recreating everything at every soap call.

So how can TSOAPDatamodule become useful. If you could add session information via a SOAP header, then there could be a session pool where the TSOAPDatamodules existed. Every SOAP call with this SOAP header was then connected to the right TSOAPDatamodule. If it was a new connection, then a new TSOAPDatamodule was created.

If this is done, then all items are only created pr. session, and we could then save other information in there, knowing that the session would keep this information.

If you look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dsml/dsml/dsml_soap_session_support.asp

Here is some information on DSML soap session support using SOAP headers.

Session state should be a choice within the TSOAPDatamodule wizard. And the wizard could then register it different to provide the session functionality. This way you have backward compatibility with existing applications using TSOAPDatamodule.

The TSOAPConnection also need some minor changes for the client to be able to use this session functionality. It needs a session property, and needs the ability to transfer the session data header with every request. But this is minor adjustments.
Steps to Reproduce:
To see problem with current functionality:

Create a new TSOAPDatamodule. Create many TClientdataset's and providers and some custom interface calls. Whenever any TClientDataset is requested or any other interface call is made from the clientside, everything inside TSOAPDatamodule is recreated.

I had to do some nasty tricks to create this behaviour in the current implementation, and have provided it as an attachment to show you what I mean.
Workarounds
None
Attachment
23262_tsoapdatamodule_session_handling.ZIP
Comments

None

Server Response from: ETNACODE01