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 (JIRA)" <ji...@apache.org> on 2006/08/27 21:32:28 UTC

[jira] Created: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
---------------------------------------------------------------------------------------------------

                 Key: WSCOMMONS-76
                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
             Project: WS-Commons
          Issue Type: New Feature
          Components: AXIOM
         Environment: windows
            Reporter: Takahide Nogayama
         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, StAX_filter_architecture.ppt


Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.

We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .

Example1)
SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.

Example2)
If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12441049 ] 
            
Eran Chinthaka commented on WSCOMMONS-76:
-----------------------------------------

Hi Dims,

Once I tried to implement FastInfoset on Axiom, I created the XMLStreamReader from it and just passed in to OMBuilder. Then I passed a XMLStreamWriter from FI to OMElement to serialize as well. There were minor issues with events, other than that there were no problems.
So I don't see any major changes required in Axiom to implement FI on Axiom. The only problem comes in selecting the proper builder when  a message comes. But it is a problem of the user, as I see it. Maximum we can give him a util to get the proper reader. 
The same problem is there in handling MTOM, in Axis2. In the servlet, we look at the content type and select SOAP builder or MTOM builder. 
So IIUC, I don't see any requirement to implement new methods to Axiom to accomodate FI. Please correct me if I'm wrong.

Thanks,
Chinthaka

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt

fix for BuilderAwareReader

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip, ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver4_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12441195 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

Hi, Rich, dims, Eran,

Basically, I agree that we set filter outside of StAXBuilder and set builder in StAXBuilder's constructor by using BuilderAwareReader.

And I prefer setting builder to OMDocument. Because some Filters may want to get  current OMNode by using StAXBuilder.getLastNode().
In third objective of second comment.

>- Avoid fruitless 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. 


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12441054 ] 
            
Eran Chinthaka commented on WSCOMMONS-76:
-----------------------------------------

Hi Rich, 

(Reply for http://issues.apache.org/jira/browse/WSCOMMONS-76#action_12440966)

Well, I was under the assumption that the filter works with events and doesn't require past informatoin. But as mentioned by Takahide, if he wanna get in to the past information, I will agree with Rich's suggestion, with one modification :).
Builder is very smooth component which should work on its own. So I do not like it to be exposed, explicitly to object other than OMtree. 
If what Takhide requires is past information, he should be ok even if we set the OM tree to his builder aware thingy. So can we modify Rich's suggestion as following.

protected StAXBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
    ....
    if (parser instanceof BuilderAwareReader) {
            ((BuilderAwareReader) parser).setDocument(this.getDocument());
     }
    .....
} 

Anyway, +1 for Rich's suggestion on BuilderAwareReader, iff Builder gets to know about BuilderAwareReader inside tht instance of checking. 

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12441200 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

In third objective of second comment(http://issues.apache.org/jira/browse/WSCOMMONS-76#action_12432513),
Invoking StAXBuilder.getLastNode() on each candidate event in Filter enables us to make candidate omNode list.

>- Avoid fruitless 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. 


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12434318 ] 
            
Eran Chinthaka commented on WSCOMMONS-76:
-----------------------------------------

I agree with the idea here. But I'm in doubt whether this should be tightly intergrated to Axiom builders or not. In other words should this be supported as a first class thing?

1. Axiom builder APIs were in Axiom for some years and there weren't a single suggestion to make changes to them. And it was/is one of the APIs which users always have to use. When I introduced the SOAPVersion param to the StAXSOAPModelBuilder constructor, people were not happy. Now we are trying to add another param, context, which will not be used 99.9% of the time by the user. (but yes we are still slowly improving apis like OMElement)

2. This can be easily implemented external to the builder. Create filter from the mechanism you've suggested and get a parser instance from it, pass that to the builder. Whatever you do internally, do it externally and provide documentation.

3. I saw you've added setParser() method to the builder, which we purposely avoided. If some one tries to change the parser, while the object model is being built or partially build, everything will get screwed. Please do note that this method was not put in, purposely.

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt

fix for BuilderAwareReader

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip, ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver4_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12438104 ] 
            
Rich Scheuerle commented on WSCOMMONS-76:
-----------------------------------------

Takahide,

I looked at the new version of the patches, and they don't seem to match your remarks.  
For example, the STAXBuilder is deleted by the second version of the patch.

Eran,

If I can get these issues corrected, may  I reopen this issue and commit the changes.   I would like to keep this issue alive.  Adding filter capabilities will enhance Axiom

thanks,
Scheu

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12440966 ] 
            
Rich Scheuerle commented on WSCOMMONS-76:
-----------------------------------------

I agree with Eran that the majority of this work should be outside of Axiom.

The crux of the issue is that you would like the XMLStreamReader to be aware of the builder.

My suggestion is to make the following changes:

a) Introduce a new interface, org.apaches.axiom.om.impl.builder.BuilderAwareReader.  The interface would have one method,
     setBuilder(StAXBuilder).

b) Provide a small change to the implementation of StAXBuilder to register the builder on the reader.

protected StAXBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) {
    ....
    if (parser instanceof BuilderAwareReader) {
            ((BuilderAwareReader) parser).serBuilder(this)
     }
    .....
}

---------------------------
If you make this change, then all of the rest of the code (all the filter stuff and registry stuff) can be outside of Axiom.
I think this makes more sense.

Comments ?


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: unitTestForBuilderAwareReader.patch.txt

This patch inclueds unit test for BuilderAwareReader

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, unitTestForBuilderAwareReader.patch.txt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip, ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver4_src_demo.zip, ver8_patch_to_axis2_modules.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Resolved: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Rich Scheuerle resolved WSCOMMONS-76.
-------------------------------------

    Resolution: Fixed

Thanks Takahide for the contribution!

I committed the following parts of the patch:
    * The new BuilderAwareReader interface
    * The changes to StAXBuilder to set itself on a BuilderAwareReader.

The other files, Filter and FilterRegistry, seem more appropriate in Axis2.
I kindly suggest that Filter and FilterRegistry be refactored and contributed via AXIS2-1085.

I am closing this issue as resolved.  We can continue the related discussion in AXIS2-1085.

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip, ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver4_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: src_demo.zip

simple demo program.

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12438573 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

Eran, 

I was missunderstanding 2, sorry. I will explain 2 reasons below, why we should insert filter in StAXBuilder.

If we create filter instance before creating StAXBuilder and put it into StAXBuilder Constructor, filter can not get bulider. For Example, 
the following code can do same as my ver3_patch.
-----------------------------------------------------------------------------------------
XMLStreamReader reader = new createXMLStreamReader(inStream, charSetEnc) ;
Filter filter = FilterRegistry.getFilter( reader );
StAXBuilder builder = new StAXBuilder( filter );
filter.setBuilder( builder );    // I do not like this line.
-----------------------------------------------------------------------------------------
In this approach, we have to set builder to filter after creating StAXBuilder. I think this is not easy for programer.
One of main reason of setting builder to filter is that we can use past information from OM tree. 
If we can not use OM tree, Filter have to store the information to local variables. see also http://issues.apache.org/jira/browse/WSCOMMONS-75.

And, StAXOMBuilder have constructor whose input argument is not XMLStreamReader. In other word, String or InputStream can go into constructor of StAXBuilder and 
XMLStreamReader is created from the String or the InputStream in constructor. If we create filter instance before creating StAXBuilder, we can not set filter against these cases.


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12432513 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

Objective of StAX Filter is mainly performance improvement. 

    - Avoid creating fruitless 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 duplicate 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 
        fruitless process. If StAX Filter converts XML data 
        before StAXBuilder, StAXOMBuilder creates only OMElements
        of converted data. 

- Avoid fruitless 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. 


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12437566 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

Old filter architecture,  patchAXIOM_to_moduleaxiom-apisrcmainjava.txt and patchAXIS2_to_moduleskernelsrc.txt, need to change constructor of StAXBuilder, StAXOMBuilder, StAXSOAPModelBuilder, and MTOMStAXSOAPModelBuilder. Most people are not happy for this change.

New Filter architecture, er2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt and ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, do not change constructor.
 StAXBuilder.enableFilter(Object object) method is added instead of changing constructor. Filter will be inserted after instance of StAXBuilder is created. The following is example
-----------------------------------------------------------------------------------------------
StAXBuilder builder = new StAXOMBuilder(xmlreader);
builder.enableFilter(msgContext);
SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
-----------------------------------------------------------------------------------------------

How do you think? Give me comments. thanks.

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12442953 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

I post paches for Rich's BuilderAwareReader for the present.

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip, ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver4_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12438119 ] 
            
Eran Chinthaka commented on WSCOMMONS-76:
-----------------------------------------

Hi Rich and Takahide,

If this is not tightly integrated in to Axiom builders and nodes, then I have no problem in going ahead with this. Please see my comment on this here (http://issues.apache.org/jira/browse/WSCOMMONS-76#action_12434318). Basically the way we should do this, IMO, is mentioned in #2. 

BTW, when the next patch comes with the changes proposed by Rich, I will look in to that for sure. Sorry for the late response on this as Axis2 1.1 is coming closer. 

Thanks,
Chinthaka



> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Resolved: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Eran Chinthaka resolved WSCOMMONS-76.
-------------------------------------

    Resolution: Won't Fix

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12436613 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

Eran

>> 1, >>2
OK, I changed my code not to use constructor input arguments.

>>3 
I agree that. I removed setParser().

Please check my new patches.


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: ver3_src_demo.zip

This is Simple demo for ver3.
Uncompress this zip file to source directory.


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12440989 ] 
            
Rich Scheuerle commented on WSCOMMONS-76:
-----------------------------------------

Dims,

I think this would require both an abstraction for a Reader and a better abstraction for Builder.

This sounds a lot more difficult than the suggestion above.  

Is it possible and performant to build a class that accepts a FastInfoSet  and exposes an XMLStreamReader ?

....
If Eran and Takahide agree on my suggestion above for BuilderAwareReader, I can contribute the patch.



> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12438121 ] 
            
Davanum Srinivas commented on WSCOMMONS-76:
-------------------------------------------

Folks,

Can we please hang onto this one till we get Axis2 1.1 out?

thanks,
dims

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt

I changed about insertion point in AXIS2.

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: ver4_src_demo.zip

fix for BuilderAwareReader

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip, ver4_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver4_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver4_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12432515 ] 
            
Takahide Nogayama commented on WSCOMMONS-76:
--------------------------------------------

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. 
    StAXBuilder can avoid creating OMElement whose actor is not "webservice1". 

        <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> 
    


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Takahide Nogayama (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Takahide Nogayama updated WSCOMMONS-76:
---------------------------------------

    Attachment: ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt

ver2 was broken, please see ver3. 

ver3
change to write log
change to use classloader of FilterRegistry if context class loader do not provide input stream


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Anonymous (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]


    Attachment: ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=comments#action_12440967 ] 
            
Davanum Srinivas commented on WSCOMMONS-76:
-------------------------------------------

Rich,

I was thinking about FastInfoset. While we are doing this, could we figure out how to plugin in a FastInfoset reader? we may need a mechanism for registering/lookup of readers based on say contenttype (and other properties?)

-- dims


> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Reopened: (WSCOMMONS-76) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WSCOMMONS-76?page=all ]

Rich Scheuerle reopened WSCOMMONS-76:
-------------------------------------

      Assignee: Rich Scheuerle
             

> StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-76
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-76
>             Project: WS-Commons
>          Issue Type: New Feature
>          Components: AXIOM
>         Environment: windows
>            Reporter: Takahide Nogayama
>         Assigned To: Rich Scheuerle
>         Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, StAX_filter_architecture.ppt, ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt, ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, ver3_patch_to_axiom_modules_axiom-api_src_main_java.txt, ver3_src_demo.zip
>
>
> Filter is interface and extends XMLStreamReader. Filter wraps XMLStreamReader. And XMLStreamReader of StAXBuilder is replaced by Filter.
> In building phase, next() method must be invoked on each event. filter get result of next() from XMLStreamReader, and do some process, then return the result to StAXBuilder.
> We can set Object on filter. Filter get some information from it and set result on it to transfer the result.
> We can set StAXBuilder on filter. Filter get OMDocument from the builder. If filter want to know past information, the OMDocument has it.
> If StAXBuilder has lastNode() method, Filter can make reference list to OMNode. this is commneted in http://issues.apache.org/jira/browse/WSCOMMONS-75 .
> Example1)
> SOAP header has some child elements. and they has actor Attribute. it indicates which intermediary should process the element.
> ExtractMyActorSOAPHeaderFilter.java is implementation of Filter for this example. The filter monitors locaName at first,
> If START_ELEMENT whose actor does not equals myactor is found, The filter invokes next() until the element's END_ELEMENT.
> Thus, The soap header elements which has other's actor are not transfered to StAXBuilder. We can ommit creating fruitness OM.
> Example2)
> If StAXBuilder has lastNode() method, Filter can make reference list. The list has OMNode whose actor indicates myactor.
> After building, If we want to access Security header elements which has myactor, we can access the element directry by using the reference list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org