You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "William S. Lear" <ra...@zopyra.com> on 2001/02/12 14:30:21 UTC

Re: Using non-xerces XML parser with Apache SOAP

On Monday, February 12, 2001 at 15:11:55 (-0800) Ruth Bergman writes:
>
>I apologize for the repetition.  I asked this question twice already in a
>different thread.  I believe, however, that the people who know the answer
>to this question are lurking on this list, but skipped my message because
>of the title of the thread :)
>
>I want to use another XML parser - not xerces - on my (Apache) SOAP client.
> In the installation guide for Apache SOAP I found the following note:
>
>While it is possible to use another parser, the current codebase does 	not
>support making this change conveniently; hence the mechanism is not
>documented here.
>
>Sounds ominous, but I'd still like to know how to do it.
>
>You may wonder why I want to do this.  My client resides in an Oracle
>database, so I would like to use Oracle XML Parser v2.  My reason is two-fold:
>1. The Oracle version I have at present has a bug which causes xerces to
>bomb.  Okay this is a weak reason, I admit.
>2. The Oracle VM already has the oracle parser installed, so it seems
>redundant to have two parsers if I can avoid it.

I'm no expert on this, but from reading the code, it appears that
Xerces is hardwired throughout the code in the following fashion:

    XMLParserLiaison xpl = new XercesParserLiaison ();

You would need to either replace XercesParserLiaison with your own
class, everywhere in the code, or replace the contents of the file

    org/apache/soap/util/xml/XercesParserLiaison.java

with a wrapper around your parse to create a fake xerces parser that
obeys the XMLParserLiaison interface.  The XercesParserLiaison code is
quite short itself (about 30 lines of code), but I'm not sure how
difficult it would be to fit your parser into the given interface...


Bill