axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Takahide Nogayama <NOGAY...@jp.ibm.com>
Subject Re: Request for XML Filter (AXIS2-1085)
Date Thu, 09 Nov 2006 17:19:19 GMT
All,

I inspect the Handler solution, the following is pros and cons.

    pros) There is no layer mixing.
    pros) There are no filter related code in AXIS2.
 
    cons) Need to change StAXBuilder to replace XMLStreamReader by Filter.
        To replace XMLStreamReader of builder by Filter, we have to add 
"setParser" method to "StAXBuilder".
        (we can get builder instance in handler by using 
((OMElementImpl)msgctx.getEnvelope()).getBuilder() )
        Apache community had already disscussed about this method ever. 
They concluded that they will never 
        add this method to StAXBuilder. Because if some one tries to 
changes the parser, while the object 
        model is being built or partially build, everything will get 
screwed.
        I heard this from 
Eran.http://issues.apache.org/jira/browse/WSCOMMONS-76#action_12434318

    cons) Filter can not see SOAPHeader StAXEvents. SOAPHeader part is 
probably already built at the time by SOAPEnvelope.getBody().
        For Example, (if we can add setParser to StAXBuilder) WSS 
specification says that two wsu:Id attributes within 
        an XML document MUST NOT have the same value. So 
Id-Uniqueness-check-Filter must check Id-Uniqueness against entire XML
        document. However, at the top of Handler chain, the elements 
before <soapenv:Body> have already been build by 
        SOAPEnvelope.getBody(). That is, its StAX events are consumed and 
trashed. Id-Uniqueness-check-Filter which is inserted by handler 
        can check the StAX events of <soapenv:Body> and its descendant 
elements, but it can not check entire Id-Uniqueness.

---------------------------
Takahide Nogayama

Mime
View raw message