[ 
https://issues.apache.org/jira/browse/MUSE-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465335
 ] 

Mohammad Fakhar commented on MUSE-181:
--------------------------------------

yes the code you pasted works also.
I also understood the issue better now; the namespace being duplicated is the 
namespace of the actual element itself, which automatically gets added to the 
element when we do: 
Element dom = XmlUtils.createElement(axiom.getQName());

......because createElement ends up calling setQNameNamespace in its path.


So I debugged further and set a breakpoint in XmlUtils.setNamespaceAttribute; 
to my surprise the attributes are listed as null, I am assuming that DOM does 
not consider the namespace node of the element itself as a namespace attribute, 
so we end up setting it again in this method? Its weird.


> Axis Environment adds dupilicate namespaces when converting axiom nodes to 
> dom nodes
> ------------------------------------------------------------------------------------
>
>                 Key: MUSE-181
>                 URL: https://issues.apache.org/jira/browse/MUSE-181
>             Project: Muse
>          Issue Type: Bug
>          Components: Deployment - Axis2
>    Affects Versions: 2.1.0
>         Environment: muse on axis2
>            Reporter: Mohammad Fakhar
>         Assigned To: Dan Jemiolo
>             Fix For: 2.2.0
>
>         Attachments: axis_env_dup_ns_patch
>
>
> The convertToDOM method in AxisEnvironment declares identical namespaces - 
> i.e. namespaces with the same prefix and same namespace uri - when converting 
> axiom nodes to DOM nodes. This leads to unexpected 500 errors in the axis 
> engine. 
> I fixed the code to ensure that no identical namespaces are declared on the 
> DOM. I will be attaching a patch.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to