You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Takahide Nogayama <NO...@jp.ibm.com> on 2006/08/30 20:02:46 UTC
[AXIOM][AXIS2] StAX Filter
Hi all,
I proposed new feature StAX Filter on JIRA
https://issues.apache.org/jira/browse/WSCOMMONS-76 and
https://issues.apache.org/jira/browse/AXIS2-1085.
StAX Filter enables us to avoid fruitness traverse and creating fruitness
OMElements. And we can convert XML data before creating OM.
If you have any comments I would be grateful if you give me it.
Thanks for your time.
---------------------------
Takahide Nogayama
Re: [AXIOM][AXIS2] StAX Filter
Posted by Takahide Nogayama <NO...@jp.ibm.com>.
Hi,
I will explain about objective, and use case.
Objective of StAX Filter is mainlly performance improvement.
- Avoid creating fruitness OMElements
If there are many unnecessary Elements in XML, and if StAX Filter
remove them before StAXBuilder,
we can save CPU and Memory resources about creating OMElements.
i.e. Others SOAP headers are unnecessary elements.
- Avoid creating dupulicate OMElements
If there are many Elements to be converted in XML, StAXOMBuilder
creates OMElements of
raw data then converts it to another OMElements. There exists
double OMElements they have same meaning.
If user only uses converted OMElements, Creating raw OMElements
are fruiteness process.
If StAX Filter converts XML data before StAXBuilder, StAXOMBuilder
creats only OMElements of converted data.
- Avoid fruitness traverse
Searching OM tree can consume many CPU resources, if target
OMElement is in edge of the OM tree or the target OMElement is not exists.
If we get candidates for this search, we can only search in the
candidate set.
StAXOMBuilder invokes next() against all XML events. And StAX
Filter pick up candidate and put it to candidate set in the next()
invocation.
Then we can use the candidate set for searching OMElement.
Example remove Security header)
Web service "webservice1" need process security header whose SOAP
actor is "webservice1" and must not process security header whose SOAP
actor is not "ws1".
In constructor of StAXBuilder, filter is inserted between
XMLStreamReader and StAXBuilder. And builder and messageContext is set to
filter here.
[StaXBuilder] -> [Filter] -> [XMLStreamReader]
Filter get actor information from MessageContext.
The following is received message and filter also receives this
message from XMLStreamReader.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<wsse:Security soapenv:actor="webservice1">
<securityheader1 />
</wsse:Security>
<wsse:Security soapenv:actor="webservice2">
<securityheader2 />
</wsse:Security>
<wsse:Security soapenv:actor="webservice3">
<securityheader3 />
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<test />
</soapenv:Body>
</soapenv:Envelope>
StAXBuilder receive the following messages from filter.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<wsse:Security soapenv:actor="webservice1">
<securityheader1 />
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<test />
</soapenv:Body>
</soapenv:Envelope>
StAXBuilder can avoid creating OMElement whose actor is not
"webservice1".
Regards,
---------------------------
Takahide Nogayama
"Ajith Ranabahu" <aj...@gmail.com>
2006/08/31 04:51
Please respond to
commons-dev@ws.apache.org
To
commons-dev@ws.apache.org
cc
Subject
Re: [AXIOM][AXIS2] StAX Filter
Hi,
I'm not very sure what this is intended for. The description in the
Jira does not make a lot of sense to me. Could you please post a
description of what is intended and the use case etc.
Since this is going to be a change in the core components it is good
to know all the details :)
Ajith
On 8/30/06, Takahide Nogayama <NO...@jp.ibm.com> wrote:
>
> Hi all,
>
> I proposed new feature StAX Filter on JIRA
> https://issues.apache.org/jira/browse/WSCOMMONS-76 and
> https://issues.apache.org/jira/browse/AXIS2-1085.
> StAX Filter enables us to avoid fruitness traverse and creating
fruitness
> OMElements. And we can convert XML data before creating OM.
>
> If you have any comments I would be grateful if you give me it.
>
> Thanks for your time.
>
> ---------------------------
> Takahide Nogayama
>
>
--
Ajith Ranabahu
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
Re: [AXIOM][AXIS2] StAX Filter
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
I'm not very sure what this is intended for. The description in the
Jira does not make a lot of sense to me. Could you please post a
description of what is intended and the use case etc.
Since this is going to be a change in the core components it is good
to know all the details :)
Ajith
On 8/30/06, Takahide Nogayama <NO...@jp.ibm.com> wrote:
>
> Hi all,
>
> I proposed new feature StAX Filter on JIRA
> https://issues.apache.org/jira/browse/WSCOMMONS-76 and
> https://issues.apache.org/jira/browse/AXIS2-1085.
> StAX Filter enables us to avoid fruitness traverse and creating fruitness
> OMElements. And we can convert XML data before creating OM.
>
> If you have any comments I would be grateful if you give me it.
>
> Thanks for your time.
>
> ---------------------------
> Takahide Nogayama
>
>
--
Ajith Ranabahu
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org