Integrating Axiom with libraries using DOM is recurring problem and
DOOM only provides a partial solution for this. I think that saying
that the authors of DOOM "only did what was minimally necessary to get
WS-Security stuff to work for Rampart via the Apache xmlsec library"
goes probably a bit too far, but it is a fact that DOOM (as well as
the axis2-saaj implementation built on top of it) is incomplete and
has many issues. Probably one reason is the pattern used by DOOM: it
implements both the Axiom API and DOM. While this sounds reasonable at
first glance, in practice we ended up with something that is a poor
Axiom implementation and a poor DOM implementation. There are
currently no plans to improve that in a systematic way (except for
WSCOMMONS-419, which is more related to DOOM as an Axiom
implementation).

I think there are three possible approaches to solve your issue:

1. We can try to fix specific issues you discover in DOOM to make it
work in your particular use case, as suggested by Ruchith.

2. Starting with version 1.2.8, Axiom has OMSource and OMResult
classes [1] which are implementations of JAXP's Source and Result
classes. You can use these to transform an Axiom tree into DOM (using
a standard implementation of DOM) and vice-versa. These two classes
are based on SAXSource and SAXResult, which means that you loose the
deferred parsing capabilities of Axiom, but in many cases this will be
acceptable.

3. Some time ago I started an alternative DOM implementation for Axiom
which relies on a different pattern than DOOM: it implements the DOM
nodes as lightweight proxies that are backed by an existing Axiom
implementation (typically the default LLOM implementation). This has
several advantages over DOOM, in particular the fact that instead of
converting from and to DOM (which is how DOOM is used in practice),
you can adapt an existing Axiom tree to DOM and create a new Axiom
tree through the DOM API. The goal is to have a really DOM compliant
implementation (including DOM 3), except for the part related to DTD
handling and validation. The implementation is not yet complete, but
already passes a large part of the W3C DOM test suite. I'm interested
in testing this on real world use cases, so I would be happy if you
could post the code that has an issue with DOOM so that I can test it.

Andreas

[1] 
http://ws.apache.org/commons/axiom/apidocs/org/apache/axiom/om/impl/jaxp/package-summary.html

On Wed, Mar 11, 2009 at 17:29, Xavier Drudis Ferran
<[email protected]> wrote:
>
> Hi.
>
> I've stepped on the same issue as Bob Jacoby, and since this post to
> the OpenSAML list is half a year old I'm asking whether it's been
> implemented meanwhile. I wouldn't want to submit an issue to JIRA if
> it's already there in some newer version, but I don't find it. And I
> don't have time now for trying to come with a patch.
>
> ----- Forwarded message from Xavier Drudis Ferran 
> <[email protected]> -----
>
> Envelope-to: xdru...@localhost
> Delivery-date: Wed, 11 Mar 2009 17:16:32 +0100
> X-Sieve: CMU Sieve 2.2
> X-Virus-Scanned: amavisd-new at clarcat.com
> X-Spam-ASN: AS237 198.108.1.0/24
> X-IronPort-Anti-Spam-Filtered: true
> X-IronPort-Anti-Spam-Result: ApICADaAt0lDz4yOgWdsb2JhbACVLwEBFiK8GoQNBoZ4
> X-IronPort-AV: E=Sophos;i="4.38,343,1233550800";
>        d="scan'208";a="4425254"
> X-Virus-Scanned: amavisd-new at clarcat.com
> Date: Wed, 11 Mar 2009 17:15:30 +0100
> From: Xavier Drudis Ferran <[email protected]>
> To: [email protected]
> X-Virus-Scanned: by mail.internet2.edu virus scanner
> Reply-To: [email protected]
> X-Sequence: 3457
> List-Id: <mace-opensaml-users.internet2.edu>
> List-Help: <mailto:[email protected]?subject=help>
> List-Unsubscribe:
>        <mailto:[email protected]?subject=unsubscribe%20mace-opensaml-users>
> List-Archive: <https://mail.internet2.edu/wws/arc/mace-opensaml-users>
> Subject: Re: [OpenSAML] OpenSAML Integration with AXIOM
> X-Virus-Scanned: by mail.internet2.edu virus scanner
>
> Does anybody know whether there've been any news on this issue
> these last 6 months ?.
> Is still reserialization needed to move from AXIOM to DOM ?
>
> I've looked at JIRA but I didn't find any issue I could identify
> as related. Maybe I should ask at Axis2-users ?
>
> On Sun, Sep 28, 2008 at 04:57:25PM -0400, Ruchith Fernando wrote:
>> On Mon, Sep 8, 2008 at 4:31 PM, Brent Putman <[email protected]> wrote:
>> >
>> > Bob Jacoby wrote:
>> >> Not strictly an opensaml question, but was hoping folks here could
>> >> provide a pointer. I'm using Axis2 to implement the artifact resolution
>> >> process. What have folks used to convert between the AXIOM object model
>> >> and DOM in order to use the various opensaml marshallers/unmarshallers?
>> >>
>> >> I've found code to move from DOM -> AXIOM, but nothing obvious for the
>> >> other way around. I know DOOM supposedly implements the DOM api, and
>> >> tried that, but it doesn't appear to support the full API because when I
>> >> tried to unmarshall a DOOM element I got a:
>> >>
>> >> java.lang.UnsupportedOperationException: TODO at
>> >> org.apache.axiom.om.impl.dom.TextImpl.getWholeText(TextImpl.java:587))
>> >>
>> >
>> > Yes, I encountered that too.  Unfortunately they apparently didn't
>> > implement the whole DOM API in DOOM, I think they only did what was
>> > minimally necessary to get WS-Security stuff to work for Rampart via the
>> > Apache xmlsec library.  :-(
>>
>> This is correct!
>>
>> AFAIK right now there are no plans to add complete DOM3 functionality
>> into DOOM.
>> However if you can identify the required subset of functionality for
>> OpenSAML integration we might able to get those implemented in
>> AXIOM-DOOM.
>>
>> Please create a JIRA here [1] and report any AXIOM related issues.
>>
>> Thanks,
>> Ruchith
>>
>> 1. https://issues.apache.org/jira/browse/WSCOMMONS-389
>>
>
> --
> Xavi Drudis Ferran
> [email protected]
>
>
> ----- End forwarded message -----
>
> --
> Xavi Drudis Ferran
> [email protected]
>

Reply via email to