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

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

I discovered it with a weird test case:
1) I send a request to a Muse service with a body like so:
<body>
     <ns1:elementA xmlns:ns1="blah"/>
</body>

2) elementA is stored as a WS-RT (WS-RP under the covers) property via a WS-RT 
capability

3) Then, as a result of another operation, an axis2 OUTGOING handler does a 
WS-RT get operation to retrieve the elementA property and sets it as a header 
on the outgoing SOAP response. This is where a mysterious 500 error gets 
generated in axis2, with no further trace or hints.

4) To debug the mysterious 500, I eventually set a breakpoint in 
AxisEnvironment and noticed that the Axiom version of the original body gets 
converted to a DOM like so with duipliates namespaces:

<body>
     <ns1:elementA xmlns:ns1="blah" xmlns:ns1="blah"/>
</body>

5) I applied the patch I just uploaded to ensure no duplicate namespace are 
ever set and things started working. As soon as I remove the patch, they 
mysterious 500 re-appears.

So yes, the duplicate namespaces are innocuous for all my tests as well, with 
the exception of the one that uses an axis2 handler to set a SOAP header to an 
element which has duplicate namespaces. 

To ensure that the same is happening in your environment, set a breakpoint on 
line 175 (the continue in the while loop) of AxisEnvironment I uploaded in 
patch; that line gets exectured for every duplicate namespace in the DOM.

> 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