Thank you for your help. But I find out on the google that ther is JSR 173: Streaming API for XML. for details: http://jcp.org/en/jsr/detail?id=173 What is its aim. Does it do streaming.
Here is that i found on the internet :
The goal of this API is to develop APIs and conventions that support processing XML as a stream. The specification will address three main areas:
Develop APIs and conventions that allow a user to programmatically pull parse events from an XML input stream. Develop APIs that allow a user to write events to an XML output stream. Develop a set of objects and interfaces that encapsulate the information contained in an XML stream. The specification should be easy to use, efficient, and not require a grammar. It should include support for namespaces, and associated XML constructs. The specification will make reasonable efforts to define APIs that are "pluggable".
Non-goals of this specification include:
Specifying a validation API. Validation will be done in the layer above the streaming parser. This does not preclude passing validation parameters to an underlying parser. Specific dependence on an XML grammar. Support for applications that transform or edit a DTD.
I assure you i am still confused although i read all these articles.
StAX is an alternate model for XML Document parsing/creation - i.e. it's an alternative to SAX (which uses parsing events) and DOM (which uses a Document Object Model to query and manipulate the XML document). The "Streaming" refers to the document parsing/creations style that it uses. While it can be used in the implementation of web services (and it is used in Axis 2.* and JWSDP 2.*) it has no effect on what a web service can consume or emit - it has got nothing to do with streaming media. An Introduction to StAX
How do I enable streaming mode? Set the property "enabledForExtensions". Note, that enabling the streaming mode doesn't mean, that all responses are served in streaming mode. It depends on the clients:
If a client sends a content-length header, then the server assumes, that the client is a traditional XML-RPC application and doesn't support the vendor extensions from Apache XML-RPC. Consequently, the server assumes, that it needs to set the content-length header itself and disables the streaming mode for that particular request. However, if the client doesn't send a content-length header, then the server assumes that it will be able to accept any standard HTTP/1.1 request and enable the streaming mode. Streaming mode means, in particular, that the response will not contain a content-length header.
What does it mean streaming mode ?
Thank you in advance for your help.
Joined: Aug 19, 2005
Originally posted by Ould Nadif: Streaming mode means, in particular, that the response will not contain a content-length header.
What does it mean streaming mode?
It means nothing more than that the client is not relying on the information in the the HTTP content header to figure out who long the HTTP response is. So it's the HTTP response that is being "streamed".
You can only start processing on the client side once the entire SOAP response (which contains all the XML data) has been received (and possibly validated).
The "streaming" here is for the benefit of the server so that it can start the transmission of the response before it is in a position to know what the total length of the response is - this can potentially shorten the delay between the end of the client request and the beginning of the the server response.
Joined: Jan 21, 2004
Thank you very much to everybody for your help. Your different advise has been very usefull.