[
https://issues.apache.org/jira/browse/WSCOMMONS-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen resolved WSCOMMONS-327.
---------------------------------------
Resolution: Fixed
Philippe,
The code snipped you posted above and the comments you added to the Axis2 issue
indicate that you didn't use the last (snapshot) version of Axiom. SAXOMBuilder
now implements LexicalHandler and should work with XMLBeans 2.3.0 (I tested
that with the code you attached to this issue). Please build Axiom from sources
or use a nightly build.
About the performance loss, it is really difficult to say. It depends on how
XMLBeans works and how Axis2 uses the resulting Axiom tree. What is clear is
that SAXOMBuilder will always build the entire Axiom tree immediately. On the
other hand, when using an XMLStreamReader, the tree will only be built if
necessary (that's why the answer to the question depends on how Axis2 uses the
result). I would strongly recommend to make this configurable in Axis2, so that
SAXOMBuilder is used only when namespace optimization is enabled.
About the patch for Axis2, the only thing I could do would be to apply it
myself, but unfortunately I'm not at all familiar with that part of the Axis2
code. I would suggest to wait a few days for reactions on the Axis2 issue, and
after that try to get attention on the axis-dev list.
Finally, since there are no pending actions related to this issue for Axiom, I
am going to mark it as resolved. Of course if you discover other issues related
to SAXOMBuilder, please feel free to reopen it or open a new issue.
> Namespace High verbosity combined with XMLBeans
> -----------------------------------------------
>
> Key: WSCOMMONS-327
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-327
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Environment: All
> Reporter: Philippe Mouawad
> Assignee: Andreas Veithen
> Attachments: NamespaceBug.zip
>
>
> Serializing an XMLBeans generated Document with:
> org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new
> org.apache.axiom.om.impl.builder.StAXOMBuilder(
> OMAbstractFactory.getOMFactory(),
> new
> org.apache.axis2.util.StreamWrapper(document.newXMLStreamReader(xmlOptions)));
> org.apache.axiom.om.OMElement documentElement = builder
> .getDocumentElement();
>
> ((org.apache.axiom.om.impl.OMNodeEx)documentElement).setParent(null);
> documentElement.serialize(System.out, new OMOutputFormat());
> Generated stream contains namespace redeclaration :
> <getLocatedProducts
> xmlns="http://v1.product.ws.store.kingfisher.com"><param0><callType
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0><param0><callType
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</callType><familyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</familyCode><moduleCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</moduleCode><subFamilyCode
>
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd">1</subFamilyCode></param0></getLocatedProducts>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.