Issue 29: Namespace prefix output on deserialize is incorrect
Status:  Verified
Owner: ----
Closed:  Sep 2010
Reported by t.schnel...@gmail.com, Sep 10, 2010
What steps will reproduce the problem?
1. Annotate your class with:
[Namespace(prefix="xsi", uri="http://www.w3.org/2001/XMLSchema-instance")]
2. Annotate an attribute in this class with:
[XmlAttribute(namespace="xsi")]
public var type:String;
3. call FlexXBEngine.instance.serialize(myClassInstance)

What is the expected output? What do you see instead?
expected output:
<node xsi:type="..." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
actual output:
<node aaa:type="..." xmlns:aaa="http://www.w3.org/2001/XMLSchema-instance"/>

What version of the product are you using? On what operating system?
1.6.2

Please provide any additional information below.


Sep 10, 2010
Project Member #1 alex.id....@gmail.com
I've seen this before... It is a weird behavior of the XML class. It seems to happen when you use more than one namespace in the xml document. I'll investigate further to see if this can be fixed somehow.
Sep 11, 2010
Project Member #2 alex.id....@gmail.com
So the issue appears when a default namespace is already in place. Because FlexXB adds the attribute dirctly to the xml (xml.@[ATT_NAMESPACED_NAME] = value) XML class strips the namepsace prefix and adds in a generated one. The solution is to first ad the namespace in the XML via the addNamespace() method.
Status: Started
Sep 14, 2010
Project Member #3 alex.id....@gmail.com
(No comment was entered for this change.)
Status: Fixed
Sep 16, 2010
Project Member #4 alex.id....@gmail.com
The fix is available in FlexXB 1.6.3
Mar 23, 2011
Project Member #5 alex.id....@gmail.com
(No comment was entered for this change.)
Status: Verified