On Friday 11 January 2008, Glen Mazza wrote:
> Hello,
>
> This question is hard for me to phrase exactly, but for a SOAP request
> which contains an input parameter which is resolved as a DataHandler
> by JAX-WS, is there a way to determine the total size in bytes of that
> DataHandler object? 

Honestly, not that I know of.  :-(

> Can I rely on any HTTP headers for that 
> information?

Unfortunately, no.   SOME toolkits will put a Content-Length header into 
the mime part for each attachment, but others don't.  

> I'm trying to insert the DataHandler-based object into a CLOB column
> in an Oracle database table.  AFAICT inserting CLOBs requires a length
> parameter, which I don't know because the DataHandler object is
> resolved as a sizeless InputStream in the service's Java code.  This
> forces us to serialize the InputStream into a file first so I can
> determine its length, prior to inserting into Oracle.  It is this
> serialization part I'd like to remove if I can.
>
> Content-Length might be a possibility, but that would take into
> account the message as a whole, also, I think with MTOM
> chunking/multiple sends occurs so the value of C-L wouldn't
> necessarily map to the size of the DataHandler object.   Overall, I'd
> just like to confirm here that there is nothing much I can accurately
> rely on within JAX-WS to get the DataHandler size.

Nope.


-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to