2008/11/12 Saniya Afaq <[EMAIL PROTECTED]>: > Hi, > > I'm using Metro 1.3 with JDK 1.5.x.
This is the Apache CXF mailing list. Metro is a completely different implementation of JAX-WS, by Sun! > I need a solution for streaming large messages - currently in my > solution - we stream large messages by using the Provider API - > dispatching the XML file from the client to the server side. > > However on the server side we receive a StaxSource object - and it is > not possible to retrieve a stream from that object. I had to do the > following in my code - but it doesn't seem like the right solution since > i do not want to write out all the binary data in memory in the > ByteOutputStream... Does Metro provide some way of going about it - > since the whole purpose of Provider API is to enable us to handle large > messages -- In CXF you can implement Provider<StreamSource>, giving you an invoke method which takes and receives a StreamSource: public StreamSource invoke( StreamSource request ) ... You can read out of this with an XMLStreamReader. I've sent/received messages with over 10Mb of XML like this. I assume you can do this in Metro as well. BTW you know StAXSource has a getXMLStreamReader() method, right? So you can probably just do that. Andrew.
