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 "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/12/13 01:36:44 UTC

[jira] Assigned: (WSCOMMONS-373) SAXOMBuilder needs to support default namespaces

     [ https://issues.apache.org/jira/browse/WSCOMMONS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned WSCOMMONS-373:
-----------------------------------------

    Assignee: Andreas Veithen

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