dev@jax-ws.java.net

Re: Stream-based attachment decoding

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Mon, 19 Dec 2005 11:40:29 -0800

Kohsuke Kawaguchi wrote:

> Vivek Pandey wrote:
>
>> Kohsuke,
>>
>> Just contentType in Decoder.decode(inputStream, contentType) may not
>> be sufficient.
>>
>> for example AttachmentStreamDecoder would need information about
>> other HTTP header parameters, such as Multipart/Related header
>> parameters, such as boundary and start. What we need here is
>> something like ContentType from JavaMail, that can give easy access
>> to the Mime parameters or the assumption here is that decode gets the
>> compelte stream that includes the HTTP headers?
>
>
> Oh wait, isn't the Content-type header like:
>
> Content-Type: multipart/related;
> boundary="--=_outer_boundary"; type="multipart/alternative"
>
> in one line? If so, decoder does get the whole thing, not just
> "multipart/related". Given that, do we still need to change the
> signature?
>
There are other headers, such as Content-Transfer-Encoding that tells
the underlying MIME transport encoding, such as for 7 bit transport(such
as SMTP) a text/xml Cotent-Type data with charset 'utf-8' will have
content-transfer-encoding="quoted-printable" or "base64".

-vivek.


-- 
Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc.