Yep, that's exactly what i'm using.
using an XmlElement-valued property instead should work for me. i haven't
"Christoph Schittko [MVP]" wrote:
> Kirk,
>
> I'm not sure if this will help, but since you mentioned that you are
> working with the SoapSender class: You may want to take a look at the
> SoapSender.Send() method in conjunction with the
> SoapEnvelope.SetBodyObject() method. It allows you to do some of the
> work "by hand" and it might save you some intermediate
> serialization/deserialization steps.
>
> HTH,
> Christoph Schittko
> MVP XML
>
http://weblogs.asp.net/cschittko >
> > -----Original Message-----
> > From: Kirk Marple [mailto:KirkMarple@discussions.microsoft.com]
> > Posted At: Monday, December 27, 2004 2:03 PM
> > Posted To: microsoft.public.dotnet.framework.webservices.enhancements
> > Conversation: serializing string property (which contains XML) to SOAP
> > message..
> > Subject: Re: serializing string property (which contains XML) to SOAP
> > messa
> >
> > hi Christoph,
> >
> > I'm working with SoapSender/SoapService.
> >
> > The newsgroup posting munged my text. This should have read:
> >
> > > > i.e. <Array><Item /></Array> is becoming
> > <(semicolon)Array>(semicolon)
> >
> > So it was HTML-encoding the text. I found this from overridding the
> > SoapSender and SoapService methods to look at the Body property.
> >
> > I'm going to change my property type to XmlElement or XmlDocument and
> that
> > should solve my problem.
> >
> > Thanks for the help,
> > Kirk
> >
> > "Christoph Schittko [MVP]" wrote:
> >
> > > Kirk,
> > >
> > > Are you working with an ASP.NET Web service or
> SoapClient/SoapService
> > > pair of classes?
> > >
> > > Regardless, strings will always be encoded according to the
> character
> > > entity encoding rules for XML [0] (which are slightly different from
> > > HTML, btw).
> > >
> > > I'm not sure I've seen anything as you describe like:
> > >
> > > > i.e. <Array><Item /></Array> is becoming <Array>
> > >
> > > How did you determine that? Did you look at an output trace or what
> kind
> > > of editor are you using?
> > >
> > > > is there a way to pass the XML thru un-encoded?
> > > >
> > > > i'm using a string property as an opaque way of storing other
> > > serialized
> > > > classes... would it make more sense to use an XmlDocument or
> XmlNode
> > > > property, and would that serialize into the SOAP body correctly?
> > >
> > > Yes, typing your parameter or return value as XmlNode or XmlDocument
> > > instead of string will serialize the raw XML into the message. Have
> you
> > > tried to serialize the objects directly into the message or do you
> have
> > > to store them in strings?
> > >
> > >
> > > HTH,
> > > Christoph Schittko
> > > MVP XML
> > >
http://weblogs.asp.net/cschittko > > >
> > > [0]
http://www.w3.org/TR/2004/REC-xml-20040204/#charsets > > >
> > > > -----Original Message-----
> > > > From: Kirk Marple [mailto:KirkMarple@discussions.microsoft.com]
> > > > Posted At: Thursday, December 23, 2004 4:01 AM
> > > > Posted To:
> microsoft.public.dotnet.framework.webservices.enhancements
> > > > Conversation: serializing string property (which contains XML) to
> SOAP
> > > > message..
> > > > Subject: serializing string property (which contains XML) to SOAP
> > > > message..
> > > >
> > > > i have a C# class which has a string property, and i'm serializing
> > > this
> > > > class
> > > > into a SOAP message.
> > > >
> > > > the string property actually contains another object serialized to
> > > XML,
> > > > and
> > > > i'm finding that this property in the SOAP body is getting
> > > HTML-encoded.
> > > >
> > > > i.e. <Array><Item /></Array> is becoming <Array> etc.
> > > >
> > > > i can't seem to find a XmlXXXAttribute which would apply in this
> case
> > > to
> > > > prevent this from happening.
> > > >
> > > > is there a way to pass the XML thru un-encoded?
> > > >
> > > > i'm using a string property as an opaque way of storing other
> > > serialized
> > > > classes... would it make more sense to use an XmlDocument or
> XmlNode
> > > > property, and would that serialize into the SOAP body correctly?
> > > >
> > > > thanks,
> > > > Kirk
> > >
> > >
>