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

Andreas Veithen updated WSCOMMONS-414:
--------------------------------------

    Fix Version/s: Axiom 1.2.8
         Assignee: Andreas Veithen

This issue seems to be related to WSCOMMONS-262. There is indeed a difference 
between StAX implementations in the way namespace prefix mappings are handled 
by the XMLStreamWriter. The code in 
OMSerializerUtil#isSetPrefixBeforeStartElement tries to identify the StAX 
implementation and to choose the right strategy. Probably in the case reported 
here, it has chosen the wrong one. This explanation is consistent with the fact 
that the problem disappears with Woodstox.

The solution I suggest is to allow the user to explicitly override the setting 
for isSetPrefixBeforeStartElement using a system property or a property file to 
be placed in the classpath.

> Namespace issue in SOAP message generated
> -----------------------------------------
>
>                 Key: WSCOMMONS-414
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-414
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: Windown XP, Sun JVM 1.5.0_10
>            Reporter: Krishna
>            Assignee: Andreas Veithen
>             Fix For: Axiom 1.2.8
>
>
> I am facing an issue with SOAP message generated by AXIS.
>  
> We have a SOAP request, which when we build and log it, gets logged as:
>  
> <OurService xmlns="http://www.somthing.com/ournamespace"; 
> xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays";>
>   <param1>
>     <arr:string>1</arr:string>
>     <arr:string>2</arr:string>
>   </param1>
>   <param2>ABC</param2>
> </OurService>
>  
> This is proper. But, when it is sent on the wire, it gets sent as:
>  
> <OurService xmlns="http://www.somthing.com/ournamespace";>
>   <param1>
>     <string 
> xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays";>1</string>
>     <string>2</string>
>   </param1>
>   <param2>ABC</param2>
> </OurService>
>  
> Note that the xmlns declaration for 
> http://schemas.microsoft.com/2003/10/Serialization/Arrays happens only once - 
> for the first child inside param1, instead of happening on each of them. 
>  
> I could trace it to OMSerializerUtil, where it is considering a namespace 
> declaration generated at the sibling level as a namespace already written and 
> hence need not be written again. 
> I already searched the net and the bugs in Axis and Axiom, but could not get 
> to anything that resembles this behavior. So, logging it as a bug, as it 
> looks like we have stumbled into an issue no one has probably faced before. 
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to