On Wed June 17 2009 7:20:09 pm Krzysztof Wilkos wrote: > I've got some busy days at university (exams etc.) but I'm close to > get session initialization working. I should finish this before the > end of this week. To initiate a session I have to call service method > so there is short way from session initialization to complete conduit > for soap over tcp protocol.
Thanks for the update. Definitely don't let work on this affect your studying for exams. Keeping grades up is higher priority. > BTW To send a message I have to know its length which I have to send > in frame header. I'm planning to make buffer and ByteArrayOutputStream > which I put into Message object and than in close method I'll send > buffer content into real stream. With this solution I will not have to > change existing cxf code which assumes that after prepare method call > there is outputstream in Message object. For small messages this > should be ok but with bigger one ByteArrayOutputStream can reallocate > buffer few times. Can I do that this way? Doesn't the SOAP/TCP protocol allow the message to be split across several frames? Basically, send a "chunk" of the message at a time? If so, your output stream would just need a fixed size buffer of some sort (like 4K or something). When the buffer fills, write out a frame and reset the buffer back to 0. That way, it would avoid having the whole message in a block. The other option is to use our CachedOutputStream. It uses a ByteArrayOutputStream for a while (64K by default), but then will change to using a temporary file for storage to avoid having huge blocks in memory. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
