The XML declaration typically includes an encoding attribute, e.g.

<?xml version="1.0" encoding="utf-8"?>

All of the XML data that follows, including stuff in CDATA, will be
interpretted using that encoding.  The parser cannot "ignore" stuff
within CDATA: it must interpret it, if only to find out when the CDATA
ends!.

Scott Nichol

----- Original Message -----
From: "Pae Choi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 6:44 PM
Subject: Re: binary data in SOAP


> Base64ing makes sense. What about the CDATA section to
> contain the binary data? It says about the "character data",
> but the parser should skip the content of the section. I
> haven't try that yet though.
>
> Does any try that before? Any comments?
>
>
> Pae
>
>
>
>
> > You do not send arbitrary binary data as XML.  XML is "readable",
i.e.
> > it is character based.  The typical encoding used is utf-8, which
would
> > not allow you to send arbitrary binary data.  It is typical to
base64
> > encode binary data, which increases its size 33%.  Welcome to XML,
which
> > you can generally assume will be the worst-case serialization method
in
> > terms of size and speed.  For size and speed, you might just use the
> > serialization built into Java.
> >
> > The MIMEPartSerializer is for attachments.  It will typically base64
> > encode binary data.  The attachments are not part of the XML itself,
so
> > if you really want to carry XML payloads, you cannot use this.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Marco Schulze" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 03, 2002 8:25 PM
> > Subject: binary data in SOAP
> >
> >
> > > Hello,
> > >
> > > how is it possible to serialize binary data (e.g. FileStreams) via
> > SOAP?
> > > I saw a MIMEPartSerializer. Does this encode like binary data in
an
> > > eMail is encoded? This would be bad, because it gets much bigger
by
> > > this. Is it possible to serialize somehow with raw binary data?
Does
> > the
> > > BeanSerializer automatically does encode streams (e.g. an image in
a
> > > FileInputStream)?
> > >
> > > I hope that I could make understandable what I mean...
> > >
> > > Thanks in advance for answers!
> > >
> > > Best regards, Marco ;-)
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to