Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 24th, 2006, 02:48 PM
jdhavo@yahoo.com
Guest
 
Posts: n/a
Default 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?

  #2  
Old February 24th, 2006, 02:55 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: XmlTextWriter cannot be serialized because it does not have adefault public constructor


jdhavo@yahoo.com wrote:
[color=blue]
> Does this mean that an XmlTextWriter cannot be used in a webservice?[/color]

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/
  #3  
Old February 24th, 2006, 03:06 PM
jdhavo@yahoo.com
Guest
 
Posts: n/a
Default Re: XmlTextWriter cannot be serialized because it does not have a default public constructor

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.

  #4  
Old February 24th, 2006, 03:08 PM
jdhavo@yahoo.com
Guest
 
Posts: n/a
Default Re: XmlTextWriter cannot be serialized because it does not have a default public constructor

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,

  #5  
Old February 24th, 2006, 03:16 PM
jdhavo@yahoo.com
Guest
 
Posts: n/a
Default Re: XmlTextWriter cannot be serialized because it does not have a default public constructor

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.

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles