Benson,
At what point is it hitting the EOF? Has it found the boundary and is
trying to read the headers? Or is the InputStream then returned have
no bytes?
One thing I see is:
--_bOuNDaRy_ee03eb38-ce97-4fa7-baa7-f145f95c5dbc
Content-Type: text/plain; charset="utf-8";
Content-ID: <0bb2a0f5-f3e8-4422-8c0d-150fe5c3c8e3>
<html> </html>
I think there is supposed to be a blank line between the headers
(Content-ID) and the actual content. Thus, the call to
new InternetHeaders(stream)
may be consuming everything as it doesn't know where the headers stop.
Not really sure though.
Dan
On Tuesday 15 January 2008, Benson Margulies wrote:
> I'm watching some of the fun in the MimePartInputStream. This seems to
> be only finding one body. That is, the first time it's asked to read
> for an attachment, as opposed to the main content, it gets to EOF.
> Anybody see why it wouldn't stop at my first boundary?
>
>
> INFO: Inbound Message
> ----------------------------
> Encoding: UTF-8
> Headers: {MessageType=[CALL], Content-Length=[937],
> Host=[localhost:8808], User-Agent=[Java/1.5.0_13],
> connection=[keep-alive], SOAPAction=[,], Pragma=[no-cache],
> content-type=[Multipart/Related; start-info="text/xml";
> type="application/xop+xml";
> boundary="_bOuNDaRy_ee03eb38-ce97-4fa7-baa7-f145f95c5dbc"],
> Cache-Control=[no-cache], Accept=[text/html, image/gif, image/jpeg, *;
> q=.2, */*; q=.2]}
> Messages:
> Message:
>
> Payload: --_bOuNDaRy_ee03eb38-ce97-4fa7-baa7-f145f95c5dbc
> Content-Type: application/xop+xml; type="text/xml"; charset=utf-8
>
> <?xml version="1.0" encoding="UTF-8"?><soap-env:Envelope
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap-env:Body
> xmlns:jns0='uri:org.apache.cxf.javascript.testns'
> xmlns:jns1='uri:org.apache.cxf.javascript.fortest' ><jns1:theArg
> xmlns:jns0='uri:org.apache.cxf.javascript.testns'
>
> ><jns0:notXml10><xop:Include
>
> xmlns:xop="http://www.w3.org/2004/08/xop/include"
> href="cid:0bb2a0f5-f3e8-4422-8c0d-150fe5c3c8e3"
> /></jns0:notXml10><jns0:ordinary>disorganized<organized</jns0:ordin
>ary></jns1:theArg></soap-env:Body></soap-env:Envelope>
>
> --_bOuNDaRy_ee03eb38-ce97-4fa7-baa7-f145f95c5dbc
> Content-Type: text/plain; charset="utf-8";
> Content-ID: <0bb2a0f5-f3e8-4422-8c0d-150fe5c3c8e3>
> <html></html>
>
> --------------------------------------
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog