Example of webservice file transfer

B

BobAchgill

Can you point me to a simple example of how to transfer a
file (send or receive) using a webservice.

Thanks!

Bob

PS. Pardon my double posting. I also posted to the
webservices forum.
 
C

Cor Ligthert

Bob,

Can you make this more clear because you have asked webservice and webserver
are you asking about two different methods.

With a webserver you have to read the file, serialize it and than get it it
using a webservice function, deserialize it and than write it to file.

I hope this helps anyhow to get an idea.

Cor
 
B

BobAchgill

Cor,

I am slowing getting the picture now for how to transfer a file using a
webservice. I have to first load the binary stream of the file into an
XML data set row on the webserver machine then the client application
can reference that webservice to bring the xml dataset over... then I
need to unload the binary row containing the contents and write it to a
file. I guess that is what you are referring to when you
say...serialize - deserialize??
I understand now how it works. Thank you!
 
C

Cor Ligthert

Bob,

See as well my other message I just have sent, however about this one, when
it is about dataset you even have not to use a serialize/deserialize method.

You can write it serialized to a file using the dataset.WriteXML method

(When you want a procedure to serialize that easy than I have those as well)

I hope this helps

Cor
 
B

BobAchgill

Cor,

Maybe in a little while I will ask about a procedure.

But first, do you think it is a good idea to serialize binary files
into rows of a data set?

In one way it seems like it may be inefficient way of moving files to
first put them into a data set with other files only to take them back
out again once the XML data set gets to the client. I have read that
if the files get too big then some people do "chunking" to split
binaries over multiple rows in the dataset so ... "not so much has to
be fit into memory at one time"??? Do you have any advice? Most of my
files are small though (15 to 50KB).

On the other hand I like the idea of deploying these 1,000's of small
files via XML webservice because it will be easier to keep track of
timestamps to control when a file needs to be sent to the client for
update. If I put all these small files in a database with a timestamp
then I can use a single query to determine which files need to be
pulled down to the client via the XML webservice for update.
Implementing a similar update scheme using FTP is not as easy to check
and compare timestamps between server and client because I will need to
parse the timestamps from the filelist to compare correctly to the
client file timestamps. Not all server filelist timestamps are the
same form.

Bob
 
C

Cor Ligthert

Bob,

I think that it would be the best to serialize a file to a blob and than do
some compression over it. However I as well never tried to sent that with a
windowsservice.

When I am in doubt, I never bother about a solution until it really gives
problems. Don't forget that in this kind of forums, there are people who can
discuss endless about boxing and unboxing however about real problems that
affect the client, you see them write seldom. A customer thinks that means
that he will accept "some" waiting time when he/she can understand why. It
gives him/her by the way the natural rest moments he/she needs as well.

Your customer is the best test about the performance and feel and look from
your applications from which you can learn the most.

Just my thought,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top