Issue 57: XmlArray member cannot have different namespace to parent/alias
Status:  Fixed
Owner: ----
Closed:  Apr 2012
Reported by domdelor...@gmail.com, Sep 30, 2011
Hi alex.

XmlArray members now inherit the namespace from the XmlArray namespace (or the XmlClass if available).

In some cases members require an alternate namespace from the parent:

e.g.
<data>
    <a:Categories>
        <b:item>1<b:/item>
        <b:item>1<b:/item>
    </a:Categories>
</data>


I've implemented a patch against trunk that adds an optional memberNamespace property to XmlArray to allow for these scenarios. Includes serialize/deserialize tests

BTW - these recent patches are all related to supporting the out-of-the-box xml structure for .NET WPF services.



What version of the product are you using? On what operating system?
flex 2.3.0, trunk

Please provide any additional information below.




flexxb_memberNS.txt
8.7 KB   View   Download
Sep 30, 2011
#1 domdelor...@gmail.com
In the above example, the flex markup looks like:

[XmlArray(type="int", memberName="item", namespace="a", memberNamespace="b")]
public var categories : Array = new Array();


BTW  - just noticed that the patch includes a couple of imports for the more recent version of flex unit. just ignore them
Sep 30, 2011
Project Member #2 alex.id....@gmail.com
Well, this can be achieved by setting that namespace on teh item class itself. Have you tried that?
Sep 30, 2011
#3 domdelor...@gmail.com
Yeah - except when dealing with simple types like string or int.

I should have mentioned that in the description.

In .net WPF XML serialization simple/primitive types are namespaced in this way.
Sep 30, 2011
Project Member #4 alex.id....@gmail.com
oh, I see now
Status: Accepted
Labels: Milestone-2.3.1
Apr 14, 2012
Project Member #5 alex.id....@gmail.com
(No comment was entered for this change.)
Status: Fixed