473,239 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

web service serve up files

Hi,

I need to implement a function, GetAllFiles, of a web
service that once called, returns all the files in a
folder to the caller. My question is: what is the best way
to implement this function? If it is just one file, I can
use FileSteam's OpenRead and return
a Byte array to the caller. But in my case I need to
transfer multiple files and I don't think calling the
function mutiple times in a loop is very efficient. What
do I do?

Thanks

Nov 21 '05 #1
4 1321
sounds like a homework problem.

So, in protocols like FTP, is there a "get all files?" No. because it
doesn't make much sense.

On the other hand, if a webservice returns information about each of the
files in a directory (like a listing: filename, size, date, etc) and the
client can call another webservice method to get any PARTICULAR file, then
the client can easily ask for the listing, get it, the turn around and ask
for each file.

For a real world system, this makes much more sense than the notion of "get
all files" returning multiple binary streams.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"feng" <an*******@discussions.microsoft.com> wrote in message
news:34****************************@phx.gbl...
Hi,

I need to implement a function, GetAllFiles, of a web
service that once called, returns all the files in a
folder to the caller. My question is: what is the best way
to implement this function? If it is just one file, I can
use FileSteam's OpenRead and return
a Byte array to the caller. But in my case I need to
transfer multiple files and I don't think calling the
function mutiple times in a loop is very efficient. What
do I do?

Thanks

Nov 21 '05 #2
Thanks Nick!

Thank you for your input. I think I should have asked my
question a little clearer. Actually, I am developing a
deployment mechenisam for a Windows form application. The
web server acts as an deploy server and its only job, once
called, is to return all the exes and dlls to the client.
The client, as a matter of fact, already know all the info
about the files contained on the server's deploy
directory. It doesn't need the server to tell it anything
about the file properties. The only thing it needs from
the server is to GetAllFiles from the deploy directory.

Now, if this sounds making a little more sense, I would
like to come back to my orrigional question: How do I
implement the operation of returning muliple files from
the server? I don't want to make one server call for each
file. That would be too inefficient.

Any idea?

Thanks again!
-----Original Message-----
sounds like a homework problem.

So, in protocols like FTP, is there a "get all files?" No. because itdoesn't make much sense.

On the other hand, if a webservice returns information about each of thefiles in a directory (like a listing: filename, size, date, etc) and theclient can call another webservice method to get any PARTICULAR file, thenthe client can easily ask for the listing, get it, the turn around and askfor each file.

For a real world system, this makes much more sense than the notion of "getall files" returning multiple binary streams.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and notrepresentative of my employer.
I do not answer questions on behalf of my employer. I'm just aprogrammer helping programmers.
--
"feng" <an*******@discussions.microsoft.com> wrote in messagenews:34****************************@phx.gbl...
Hi,

I need to implement a function, GetAllFiles, of a web
service that once called, returns all the files in a
folder to the caller. My question is: what is the best way to implement this function? If it is just one file, I can use FileSteam's OpenRead and return
a Byte array to the caller. But in my case I need to
transfer multiple files and I don't think calling the
function mutiple times in a loop is very efficient. What
do I do?

Thanks

.

Nov 21 '05 #3
zip all files into one file?

"feng" <an*******@discussions.microsoft.com> escribió en el mensaje
news:51****************************@phx.gbl...
Thanks Nick!

Thank you for your input. I think I should have asked my
question a little clearer. Actually, I am developing a
deployment mechenisam for a Windows form application. The
web server acts as an deploy server and its only job, once
called, is to return all the exes and dlls to the client.
The client, as a matter of fact, already know all the info
about the files contained on the server's deploy
directory. It doesn't need the server to tell it anything
about the file properties. The only thing it needs from
the server is to GetAllFiles from the deploy directory.

Now, if this sounds making a little more sense, I would
like to come back to my orrigional question: How do I
implement the operation of returning muliple files from
the server? I don't want to make one server call for each
file. That would be too inefficient.

Any idea?

Thanks again!
-----Original Message-----
sounds like a homework problem.

So, in protocols like FTP, is there a "get all files?" No. because itdoesn't make much sense.

On the other hand, if a webservice returns information about each of thefiles in a directory (like a listing: filename, size, date, etc) and theclient can call another webservice method to get any PARTICULAR file, thenthe client can easily ask for the listing, get it, the turn around and askfor each file.

For a real world system, this makes much more sense than the notion of "getall files" returning multiple binary streams.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and notrepresentative of my employer.
I do not answer questions on behalf of my employer. I'm just aprogrammer helping programmers.
--
"feng" <an*******@discussions.microsoft.com> wrote in messagenews:34****************************@phx.gbl...
Hi,

I need to implement a function, GetAllFiles, of a web
service that once called, returns all the files in a
folder to the caller. My question is: what is the best way to implement this function? If it is just one file, I can use FileSteam's OpenRead and return
a Byte array to the caller. But in my case I need to
transfer multiple files and I don't think calling the
function mutiple times in a loop is very efficient. What
do I do?

Thanks

.

Nov 21 '05 #4
To answer your question: One format that can represent multiple files is
MIME. You can essentially make each file an attachment in a MIME message,
embed the MIME message into a SOAP response, and return that response after
your call.

I disagree that multiple calls is inefficient in some way. However, I hope
the info helps.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"feng" <an*******@discussions.microsoft.com> wrote in message
news:51****************************@phx.gbl...
Thanks Nick!

Thank you for your input. I think I should have asked my
question a little clearer. Actually, I am developing a
deployment mechenisam for a Windows form application. The
web server acts as an deploy server and its only job, once
called, is to return all the exes and dlls to the client.
The client, as a matter of fact, already know all the info
about the files contained on the server's deploy
directory. It doesn't need the server to tell it anything
about the file properties. The only thing it needs from
the server is to GetAllFiles from the deploy directory.

Now, if this sounds making a little more sense, I would
like to come back to my orrigional question: How do I
implement the operation of returning muliple files from
the server? I don't want to make one server call for each
file. That would be too inefficient.

Any idea?

Thanks again!
-----Original Message-----
sounds like a homework problem.

So, in protocols like FTP, is there a "get all files?"

No. because it
doesn't make much sense.

On the other hand, if a webservice returns information

about each of the
files in a directory (like a listing: filename, size,

date, etc) and the
client can call another webservice method to get any

PARTICULAR file, then
the client can easily ask for the listing, get it, the

turn around and ask
for each file.

For a real world system, this makes much more sense than

the notion of "get
all files" returning multiple binary streams.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own,

and not
representative of my employer.
I do not answer questions on behalf of my employer.

I'm just a
programmer helping programmers.
--
"feng" <an*******@discussions.microsoft.com> wrote in

message
news:34****************************@phx.gbl...
Hi,

I need to implement a function, GetAllFiles, of a web
service that once called, returns all the files in a
folder to the caller. My question is: what is the best way to implement this function? If it is just one file, I can use FileSteam's OpenRead and return
a Byte array to the caller. But in my case I need to
transfer multiple files and I don't think calling the
function mutiple times in a loop is very efficient. What
do I do?

Thanks

.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mark J. McGinty | last post by:
Greets, One site I've written allows the user to install an IE extension menu (not malware at all) by downloading/merging a short .REG file. Worked like a peach on Win2K Server, now that I...
21
by: Hattuari | last post by:
I'm learning C++ after having spent several years in the computer industry doing both system administration and engineering. I've written code in Perl, Bash, Pascal, Ada, C, Mathematica (hundreds...
2
by: Jim Adams | last post by:
My project requires IIS (dotNet) and Apache to consume the same web service. What's the recommended way to display the same HTML output from both platforms? I've read about server-side XSLT...
3
by: Neil Zanella | last post by:
Hello, I wonder whether anyone knows of any service providers which issue shell access for file upload (as in Unix ssh service), and at the same time allow users to serve ASP.NET files (via...
17
by: Jeremy Chapman | last post by:
I've seen apps where if a windows exe form is running, it publishes a web service. There is no IIS folders or virtual directories required. Does anyone have information on how to do this?
5
by: Gardar | last post by:
I have a .net webservice, developed with c++ managed extensions. The websrvice returns an xml-document with a reference to a server side xml-stylesheet in the format <?xml-stylesheet href =...
5
by: marccruz | last post by:
Hi, I am writing a Windows Service in C#. I want to gracefully fail the "protected override void OnStop()" function. To do this, I first tried throwing an Exception in the function. However,...
4
by: Alice | last post by:
How can I make php script serve up an *.html file 'server-parsed' for SSI's? The goal is to pre-process all *.html files with php script, but the SSI's need to be handled too. Problem with...
6
by: half.italian | last post by:
Hi, I'm trying to serve up a simple XMLRPC server as a windows service. I got it to run properly, I'm just not sure how to stop it properly. Most of the documentation/examples I found for this...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.