You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by David Melgar <dm...@us.ibm.com> on 2001/07/20 18:42:59 UTC

Issues with current AXIS

I have written several message based handlers with earlier versions of AXIS
(April timeframe). I am now attempting to migrate these handler to the
current version of AXIS and have come up with some fundamental issues.

As I read the code, it looks like all reference to DOM have been removed
from the objects that represent the message (Message, Envelope, Header,
Body). While this may help the parsing speed problem, but it creates an
environment for message based handlers that lacks basic needed
capabilities.

SOAP is XML messaging. The standard API used to interact with XML data
structures is DOM. May not be the best standard, but at least it is
standard and ubiquitous. It is natural and expected that message based
handlers will want to work with the message through the DOM API.

AXIS should provide a framework to assist with the development of handlers.
With the current code, it looks like I'll have to get an inefficient string
representation of the message and perform all my own parsing to DOM. Rather
than have each handler resort to this, AXIS should provide methods to
assist. These methods can provide greater efficiency than each handler
dealing with its own parsing.

The handlers I work with heavily modify the soap body as well as search
for, create and remove soap headers. I do not see how the current message
element objects help. How is the payload accessed and manipulated? I could
not find a mechanism to access the payload other than as a string.  Its
tempting to use some old Apache SOAP classes and rebuild my own envelope,
header and body by parsing the string format that I can get from AXIS. This
is far from ideal.

Different topic: Why does MessageElement.getRoot return a boolean? Why not
name it isRoot? There was a getRoot in the past which returned element.
I'm sure there must be some history behind this decision, but it should be
changed regardless.




David Melgar
Web Services Toolkit Development
Emerging Technologies
dmelgar@us.ibm.com


Re: Issues with current AXIS

Posted by Rob Jellinghaus <ro...@unrealities.com>.
I don't know the right way to address your issues in Axis, but I do know
that Axis is fundamentally *not* intended to be a DOM-based parser.  Axis
is intended to have SAX nature, fundamentally.  This has always been the
goal.  It's unfortunate that the prior state of the code led you to think
things would remain as they were, when in reality the prior state was
semi-broken from the standpoint of Axis's intended direction.  (The perils
of pre-alpha development....)

If your handlers do not fit well into a SAX-based model, due to the number
and kind of changes that your handlers want to make to the message, it
seems like we Axis developers have a few choices:

- Expose our recording of the message's SAX events in a way that allows the
message to be modified

- Provide "getMessageAsDOM()" or some such

- Provide a wrapper class exposing the SAX recording as a DOM structure (I
seem to remember Sam saying he thought a DOM object would be a good
implementation of the recorded SAX events... hmm....)

- Leave you to build your own DOM wrapper (that's not very nice to our
customers!)

And now I've said more than I really understand.  Glen?  Sam?

Cheers,
Rob

At 12:42 PM 7/20/2001 -0400, David Melgar wrote:
>I have written several message based handlers with earlier versions of AXIS
>(April timeframe). I am now attempting to migrate these handler to the
>current version of AXIS and have come up with some fundamental issues.
>
>As I read the code, it looks like all reference to DOM have been removed
>from the objects that represent the message (Message, Envelope, Header,
>Body). While this may help the parsing speed problem, but it creates an
>environment for message based handlers that lacks basic needed
>capabilities.
>
>SOAP is XML messaging. The standard API used to interact with XML data
>structures is DOM. May not be the best standard, but at least it is
>standard and ubiquitous. It is natural and expected that message based
>handlers will want to work with the message through the DOM API.
>
>AXIS should provide a framework to assist with the development of handlers.
>With the current code, it looks like I'll have to get an inefficient string
>representation of the message and perform all my own parsing to DOM. Rather
>than have each handler resort to this, AXIS should provide methods to
>assist. These methods can provide greater efficiency than each handler
>dealing with its own parsing.
>
>The handlers I work with heavily modify the soap body as well as search
>for, create and remove soap headers. I do not see how the current message
>element objects help. How is the payload accessed and manipulated? I could
>not find a mechanism to access the payload other than as a string.  Its
>tempting to use some old Apache SOAP classes and rebuild my own envelope,
>header and body by parsing the string format that I can get from AXIS. This
>is far from ideal.
>
>Different topic: Why does MessageElement.getRoot return a boolean? Why not
>name it isRoot? There was a getRoot in the past which returned element.
>I'm sure there must be some history behind this decision, but it should be
>changed regardless.
>
>
>
>
>David Melgar
>Web Services Toolkit Development
>Emerging Technologies
>dmelgar@us.ibm.com
>
>
>