There are roughly 2 ways to deal with XML:
1. All at once in a tree of some sort, like a DOM 2. As a stream: like Sax, Pull parsers or XML Readers
DOMs are generally easier to deal with since all of the XML is available and you can write code that runs around the tree discovering things. BUT the memory requirements to hold an entire DOM in memory can be really high. Think of all the data in memory then add in the overhead associated with keeping track of all the various nodes, children etc.
Streaming is generally a bit harder to do since you have to maintain whatever state you think is relevant as you read chunk by chunk through the infoset. The upside is that you only have to store the parts you care about. When the "parts you care about" gets larger and larger you may as well make a DOM. Infact depending on what you want to do with the XML it may be difficult to avoid making a DOM of it.
I belive Axis supports both modes. The first handler to make a DOM causes the complete DOM parse then subsequent handlers can opeate on that DOM. But, the DOM isn't built unless a handler requests it so its theoretically possible to stream parse your requests.
Anybody know more practical aspects of this? What handler commonly initiates the DOM parse? Is it really avoidable?
Jim
Miller, Janet wrote:
How do you stream parse it in one pass and what does that mean? Sorry if this is a stupid question. Haven't actually worked with web services yet.
Jan
-----Original Message-----
From: Jim Murphy [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 3:48 PM
To: [EMAIL PROTECTED]
Subject: Re: SOAP message size limit with Axis
Thats a pretty large SOAP message - I hope you have lots of RAM in the server machine.
I should say its a large message to parse into a DOM - not much is too large if you can stream parse it in one pass.
Jim Murphy Mindreef, Inc.
Miller, Janet wrote:
I will be getting one message of that size every minute.
I am new to Web Services, so it will take awhile before I can try it. Also, the Web Service is not available yet.
-----Original Message----- From: Nelson Minar [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 3:25 PM To: [EMAIL PROTECTED] Cc: Miller, Janet Subject: Re: SOAP message size limit with Axis
I will be accessing a Web Service written using Axis. The messages will
be about 3.2MB or less in size. I'm wondering if I will have performance issues parsing a message of this size.
I suggest you just try it and report back! I think it should work OK, but the details depend a lot on what's in the messages and how many of
them you're getting at once.