Re: Transactional webservice
- From: "David" <david.colliver.NEWS@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Apr 2009 17:58:48 +0100
Hi Patrice,
ph is basically a connection to my webservice.
I could do it as an atomic transaction, but I am not sure how to transmit
multiple files in one hit. (At the point of uploading, I know how many
files, but the amount can be variable, for example, it won't always be two
files.).
If I was to use session state, how would I do that? At the webservice end or
the windows service end? I am guessing the webservice end.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Patrice" <http://www.chez.com/scribe/> wrote in message
news:45208647-EBC5-4990-A7BE-8E773A9D91F7@xxxxxxxxxxxxxxxx
ph is a web service reference ? What mechanism do you use to remember the
previous value accross calls ?
IMHO whenever possible try to group atomic calls as a single call and so
that you don't have anything to remember i.e. I would rather design my web
service so that I can use something such as :
ph.UploadFiles(ApplicationName,MyFiles); // Transmit application name and
an array whose size will give the number of files
If you really can't do otherwise then you have to implement a "state"
mechanism (either a session state "as usual" or by using a custom handle
based mechanism) :
MyHandle=ph.StartSomething();
ph.MyCall(MyHandle,Arguments);
ph.OtherCall(MyHandle,Arguments);
ph.StopSomething(MyHandle);
--
Patrice
"David" <david.colliver.NEWS@xxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de groupe de discussion : ecfIK0FuJHA.4592@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I have written a webservice, and certain things need to happen in a
certain
order and with a transactional nature. Ignore DB transactions at this
point...
For example...
Coming into the webservice will be an ApplicationName. Also coming in
will
be some files. It can be one, it can be many. No files can be handled
until
the application name has been set, (for this, I have a property, the file
handler will check this property before handling files).
Once the files have been handled, I then need to process them.
The current steps in my calling app are:
ph.ApplicationName(appname);
ph.FileCount(fileCount);
foreach (file in fileList)
{
// Ignore syntax...
ph.PutFile(bytebuffer, filename);
}
ph.ProcessFiles();
So, what is happening at the webservice itself is that it appears that
applicationname (which is populating a private property called appname)
is not set properly. It gets set, but when I come to PutFile, I check if
the appname (and filecount) have been set and if so, then PUT the files.
Am I missing something? I need to have all the values set. Especially
when it comes to handling the files, I need for a file list on the
webservice, but if it is not remembering, then I am not sure I can do it
that way.
Any ideas would be appreciated.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
.
- Follow-Ups:
- Re: Transactional webservice
- From: Andrew Morton
- Re: Transactional webservice
- From: Patrice
- Re: Transactional webservice
- References:
- Transactional webservice
- From: David
- Re: Transactional webservice
- From: Patrice
- Transactional webservice
- Prev by Date: Re: How to test for NULL in this scenario?
- Next by Date: Re: Security Tab -error
- Previous by thread: Re: Transactional webservice
- Next by thread: Re: Transactional webservice
- Index(es):
Relevant Pages
|
Loading