473,785 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Example of webservice file transfer


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.
Nov 21 '05 #1
5 5628
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
Nov 21 '05 #2
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!

Nov 21 '05 #3
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.WriteXM L method

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

I hope this helps

Cor
Nov 21 '05 #4
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

Nov 21 '05 #5
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
Nov 21 '05 #6

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

Similar topics

4
7509
by: Sunny | last post by:
Hi all, I have to prepare a webservice (framework 1.1, C#) and winapp client (fw 1.1, C#). The service will prepare a file and soul send it to the client. Any help in that direction, how to implement file transfer between webservice and client? Thanks Sunny
1
1152
by: Erik | last post by:
Does anyone know why this happens? When returning the XML string through the webservice the XML string is filled with escape characters: XML string before webservice transfer: <Node ObjectID="d0bf7c3a-5305-4020-be1f-75bcb23adab4" MasterID="d8665536-2ebe-4bd8-a176-9fc53ab8fadf" ParentID="f5ea1f44-5cbf-44d9-846d-74a81ec57786" ObjectName="Folder1" ObjectTypeID="afed7347-d07e-44b4-b467-3a15dbd8dfbc" ObjectTypeName="lblFolder"...
10
1639
by: ad | last post by:
I want to use WebServer to receive a DataSet from Client with internet. The DataSet is some bigger, there are 50 fields and about 50000 rows in it. Is it OK to do so? Will DotFrameWork or IIS compress the tream when transferring?
4
2097
by: WStoreyII | last post by:
I wish to know how to set it up so that when an xml webservice is called that instead of displaying the xml in the browser it will render it with a xslt file the problem is i dont know how to do this? Thanks again WStoreyII
5
6913
by: mtv | last post by:
Hi all, I have the following code: ================================ Webservice side: public class MyWS: WebService { private myLib.DataObject curDataObject;
6
10084
by: Carlos Lozano | last post by:
Hi, as a background I have an Windows application developed with VS 2003 (c#) that needs to transfer securely data to a MySQL database located on a Linux server. I have created a PHP webservice that will receive an xml file with all the data to update an encrypted database. This way all database logic will remain on the Linux server. The web service works OK using a testing PHP client.
2
5291
by: Praveen | last post by:
Hi All, I have made a webservice in C# and it works fine in my machine. I ran into a crazy problem when I wanted to deploy it in windows 2003 server. I have run "aspnet_regiis.exe -i" to make sure that the extensions for .asmx file etc are in place. I am getting http 404 when I give the url for the asmx file. the http error code is wrong because I am dead sure that the file is there. could you please let me know what else needs to be...
0
927
by: JJ | last post by:
I have a requirement where I need to transfer a web.config from one webservice to another webservice. The environment for this will be intranet only. I will use a xaml win app client to initiate this process to webservice. What is the best approach for transfering this file? My design is to update a web.config in one webservice and pass it onto another sitting on the machine where the web app lives. Does anybody see any other issues I...
0
1169
by: nano2k | last post by:
Hi I need to automatically update a webservice that is already deployed. That is, when I release a new version of webservice, I want the webservice to automatically update itself. To accomplish that, I use a webmethod to transfer a zipped file containing all the files needed (binary files + some xml files, etc). After the transfer is done, I try to launch a new process (console application) that will actually copy the files inside the...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.