[ https://issues.apache.org/jira/browse/WSCOMMONS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved WSCOMMONS-373. --------------------------------------- Resolution: Fixed Fix Version/s: Axiom 1.2.8 Resolved in trunk. Thanks for spotting this bug! > SAXOMBuilder needs to support default namespaces > ------------------------------------------------ > > Key: WSCOMMONS-373 > URL: https://issues.apache.org/jira/browse/WSCOMMONS-373 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Environment: All > Reporter: Michael Heemskerk > Assignee: Andreas Veithen > Priority: Minor > Fix For: Axiom 1.2.8 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > It is impossible to create elements with the SAXOMBuilder that use a default > namespace. The startPrefixMapping method always calls > OMElement.declareNamespace, even when the provided prefix is "" or null. > OMElement in turn creates a prefix "axis2ns1". > This is an issue when using a Castor mapping file in combination with > spring-oxm. > A possible fix to this issue would be to change the startPrefixMapping method > to call OMElement.declareDefaultNamespace when the provided prefix is null or > "", e.g. > public void startPrefixMapping(String prefix, String uri) > throws SAXException { > if (nextElem == null) > nextElem = createNextElement(null); > if (null == prefix || "".equals(prefix)) { > nextElem.declareDefaultNamespace(uri); > } else { > nextElem.declareNamespace(uri, prefix); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.