473,405 Members | 2,373 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,405 software developers and data experts.

Passing XML data and providing progress to client.

I want to pass chunks of an xml file or an entire xml file to my WS.
I'm surprised to see fro MSDN that no System.Xml class is serializable
(XmlDocument, XmlElement and XmlNode):
- I should use a string as the web method parameter?
- to create the string I should use a stream to read the file or there is a
System.Xml method?
- to validate xml on the WS how can I pass the string to the XmlReader?
To provide progress to client I've seen WSE 2.0 documentation and this
article:
http://msdn2.microsoft.com/en-us/library/aa480520.aspx

I want to transfer an xml file of N bytes and to update the progress bar
each time N/100 bytes are transferred.
I think I should analyze data transfer, that is detect a transfer of N/100
and update the progress.

When are data transferred: during serialization (each serialized byte is
automatically sent on the wire) or there is another stage after
AfterSerialize?

Why the article use BeforeDeserialize?
I think it is related not to request (data send) but to response that is
when the web method has returned: the article is processing returned data in
my opinion; moreover it is processing a buffer of 8KB of data not data as
they are received N/100 at a time!
In this way the progress goes faster than real even if it starts after data
are received (the progress bar waits and then it fills quickly): this can
simulate progress only if data are much bigger than 8K (at least 160K).

I think it should analyze request not response but I do not know hot to
monitor fisical data transfer of N/100 bytes.

"In order for a SOAP extension to be invoked for a client application, the
SoapExtension class must be configured appropriately. For a Microsoft
Windows Form application, this involves modifying the application's
configuration file."
The problem is I'm using VS 2003 to develop a Windows CE .Net 4.2
application: configuration files do not exist, so how to tell my app to
use my SOAP extension?
Thanks,
Luigi.
May 22 '07 #1
1 2131
Actually they are - but IXmlSerializable, not [Serializable].

For asmx / WSE, I believe that XmlNode (a base-class) will work OK
(but match the incoming node - there might be a wrapper layer). For
WCF, XmlElement does the business.

Using a string can be a pain for large xml, as the tags will get
escaped in transit (just causes bloat - will be invisible at both
ends).

However; ad-hoc file fragments must be considered completely
separately. Without extensions, each request is broadly atomic, so you
are unlikely to have convenient well-formed xml fragments every <x>
bytes (even with rounding and padding). As such, perhaps consider this
instead as a binary upload (perhaps using MTOM for WSE3; not sure
about WSE2 on CE). Some of the WSE3/WCF demo samples included code for
uploading an image in this way; the idea would be identical for *any*
binary file format. Chunk it; upload it. This way you don't need the
SOAP extensions, and you get a better indication of progress, plus the
ability to resume uploads.

Of course, most things that you can do in configuration can also be
done at runtime, but I don't know what is supported by CE.

Marc
May 22 '07 #2

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

Similar topics

27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
0
by: Stylus Studio | last post by:
Stylus Studio 6 XML Enterprise Edition Now Integrates with TigerLogic XDMS XQuery and Native XML Database Bedford, MA, -- Stylus Studio ( http://www.stylusstudio.com ), the industry-leading...
0
by: Stylus Studio | last post by:
DataDirect XQuery(TM) is the First Embeddable Component for XQuery That is Modeled after the XQuery API for Java(TM) (XQJ) BEDFORD, Mass.--Sept. 20, 2005--DataDirect Technologies...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
0
by: Eric Richardson | last post by:
I have a web service method that asyhcronously calls a long-running function, using BeginInvoke, passing a callback delegate. So the client calls the web method, which makes an asynchronous call...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
2
by: Bill Nguyen | last post by:
Please help me to accomplish this. I would like to create a sub/function that will display info & progress from a called routine on the calling Form as follow. Thanks a million. Bill...
0
by: saish | last post by:
Hello I am new to vb.net webservice. My requirement is to design a VB.net web service which will send and receive xml documents. The xml document send and received would be a very complex .xsd...
6
by: Tom | last post by:
This is probably a really basic question, but I know someone will be able to help me. I have a single object A that contains a hash of objects B. Each object B contains its own TCP client object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.