473,387 Members | 1,863 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,387 software developers and data experts.

XmlTextWriter cannot be serialized because it does not have a default public constructor

Just a quick question.
Does this mean that an XmlTextWriter cannot be used in a webservice?
Is there some special coding required to use this class?

Feb 24 '06 #1
4 3037

jd****@yahoo.com wrote:
Does this mean that an XmlTextWriter cannot be used in a webservice?


What kind of "use" are you talking about? It is certainly possible to
create an instance of XmlTextWriter in a web service method/class and
use it to write some XML.
Using XmlTextWriter as the type of a parameter or result of a web
service is a different issue. I am currently not sure why you would want
to do that.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Feb 24 '06 #2
I'm trying to return an image from a webservice in an XML document.
Using a string to contain the XML document doesn't work. It allows the
document to be saved to disk but if you attempt to open it directly
from the download dialog, it abends with an invalid header.

I thought If I returned an XmlTextWriter, that might work. But I see
that it cannot be returned from a web service. It would have to be
converted to something else. I don't believe a stringwriter would be
any better than a string.

Thank you for the response.

Feb 24 '06 #3
As a matter of fact, I receive the serialization error whenever I
instantiate the XmlTextWriter. Whether or not I am returning it from a
method call. It cannot be instantiated period.

Thank you again,

Feb 24 '06 #4
Never mind on this post.
I'm still not sure how to get an image to download using XML. I could
create a structure and download the metadata on the image in XML and a
binary file for the actual image. I would prefer to do it all in xml
however.

Feb 24 '06 #5

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

Similar topics

3
by: Integer Software | last post by:
Hi. I have a really simple set of classes that writes 2 pathnames to a xml file. I can write the default ok. Then if I change 1 pathname to a shorter one, then rewrite the xml file, the remains...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
5
by: Jain, Pranay Kumar | last post by:
Hello Everyone, I have written a simple app. that converts the dataset into excelspreadsheet. The App. uses the following architecture. First it generates the dataset with corresponding...
2
by: Jesper Stocholm | last post by:
I use an XmlTextWriter to generate xml data. The declaration is: System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.IO.StringWriter sw = new System.IO.StringWriter(sb);...
4
by: Einar Høst | last post by:
Hi, I'm having weird problems using StringWriter and XmlTextWriter. My code looks like this: StringWriter sw = new StringWriter(CultureInfo.InvariantInfo); XmlTextWriter xtw = new...
7
by: John Grandy | last post by:
make a call to XML Web Service WebMethod ... returns object myArray with no error ... myArray contains objects of type StringKeyStringValue runtime error occurs on accessing properties of...
7
by: Wayne Brantley | last post by:
I have found what appears to be an error in streaming with Datasets. It causes an error of 'Cannot find relation 0' when recreating the dataset from a stream. Here is how you reproduce it. ...
12
by: Ole Nielsby | last post by:
Why is this? I've stumbled on this restriction more than once, and I'd like to know the philosophy behind it if there is one. I figure I'd be less prone to make this error if I knew the reason....
0
by: bharathreddy | last post by:
Before going to that i want to say few thing on serialization : Serialization is the process of converting an object into a form that can be readily transported. For example, you can serialize an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.